xref: /llvm-project/clang/test/Sema/typedef-redef.c (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 typedef const int x; // expected-note {{previous definition is here}}
4 extern x a;
5 typedef int x;  // expected-error {{typedef redefinition with different types}}
6 extern x a;
7 
8 int y; // expected-note 2 {{previous definition is here}}
9 float y; // expected-error{{redefinition of 'y' with a different type}}
10 double y; // expected-error{{redefinition of 'y' with a different type}}
11