[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Frontend / verify-marker.c
blob7beee9732462c635684a68ad445bbbd1381bd884
1 // RUN: %clang_cc1 -verify %s
3 #include "verify-marker.h" // expected-error@#1 {{unknown type name 'unknown_type'}}
5 int x = 1; // #a
6 int x = 2; // #b
7 // expected-error@#b {{redefinition of 'x'}}
8 // expected-note@#a {{previous}}
10 // expected-error@#unknown {{}} expected-error {{use of undefined marker '#unknown'}}
12 // This is OK: there's no problem with a source file containing what looks like
13 // a duplicate definition of a marker if that marker is never used.
14 // #foo
15 // #foo
17 // #bar expected-note {{ambiguous marker '#bar' is defined here}}
18 // #bar expected-note {{ambiguous marker '#bar' is defined here}}
19 // expected-error@#bar 0-1{{oops}} expected-error{{reference to marker '#bar' is ambiguous}}
21 // expected-error@#forward_ref {{undeclared identifier 'future'}}
22 int y = future; // #forward_ref