brintos

brintos / llvm-project-archived public Read only

0
0
Text · 810 B · 7beee97 Raw
23 lines · c
1// RUN: %clang_cc1 -verify %s2 3#include "verify-marker.h" // expected-error@#1 {{unknown type name 'unknown_type'}}4 5int x = 1; // #a6int x = 2; // #b7// expected-error@#b {{redefinition of 'x'}}8// expected-note@#a {{previous}}9 10// expected-error@#unknown {{}}  expected-error {{use of undefined marker '#unknown'}}11 12// This is OK: there's no problem with a source file containing what looks like13// a duplicate definition of a marker if that marker is never used.14// #foo15// #foo16 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}}20 21// expected-error@#forward_ref {{undeclared identifier 'future'}}22int y = future; // #forward_ref23