Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Eli Friedman | 54ecfce | 2008-06-11 06:20:39 +0000 | [diff] [blame] | 2 | |
Chris Lattner | 5f4a682 | 2008-11-23 23:12:31 +0000 | [diff] [blame] | 3 | typedef const int x; // expected-note {{previous definition is here}} |
Douglas Gregor | cda9c67 | 2009-02-16 17:45:42 +0000 | [diff] [blame] | 4 | extern x a; |
Chris Lattner | 99cb997 | 2008-07-25 18:44:27 +0000 | [diff] [blame] | 5 | typedef int x; // expected-error {{typedef redefinition with different types}} |
Douglas Gregor | cda9c67 | 2009-02-16 17:45:42 +0000 | [diff] [blame] | 6 | extern x a; |
Chris Lattner | 99cb997 | 2008-07-25 18:44:27 +0000 | [diff] [blame] | 7 | |
Douglas Gregor | cda9c67 | 2009-02-16 17:45:42 +0000 | [diff] [blame] | 8 | // <rdar://problem/6097585> |
| 9 | int y; // expected-note 2 {{previous definition is here}} |
| 10 | float y; // expected-error{{redefinition of 'y' with a different type}} |
| 11 | double y; // expected-error{{redefinition of 'y' with a different type}} |