forked from OSchip/llvm-project
Tests for C++ lex.trigraph, patch by Mats!
llvm-svn: 79841
This commit is contained in:
parent
6973395cc7
commit
0ad0c21248
|
@ -0,0 +1,19 @@
|
|||
// RUN: clang-cc -fsyntax-only -trigraphs -Wtrigraphs -verify %s
|
||||
|
||||
??=pragma // expected-warning {{trigraph converted to '#' character}}
|
||||
|
||||
int a = '??/0'; // expected-warning {{trigraph converted to '\' character}}
|
||||
|
||||
int b = 1 ??' 0; // expected-warning {{trigraph converted to '^' character}}
|
||||
|
||||
int c ??(1]; // expected-warning {{trigraph converted to '[' character}}
|
||||
|
||||
int d [1??); // expected-warning {{trigraph converted to ']' character}}
|
||||
|
||||
int e = 1 ??! 0; // expected-warning {{trigraph converted to '|' character}}
|
||||
|
||||
void f() ??<} // expected-warning {{trigraph converted to '{' character}}
|
||||
|
||||
void g() {??> // expected-warning {{trigraph converted to '}' character}}
|
||||
|
||||
int h = ??- 0; // expected-warning {{trigraph converted to '~' character}}
|
|
@ -0,0 +1,3 @@
|
|||
// RUN: clang-cc -fsyntax-only -trigraphs -Wtrigraphs -verify %s
|
||||
|
||||
??=define arraycheck(a,b) a??(b??) ??!??! b??(a??) // expected-warning {{trigraph converted to '#' character}} expected-warning {{trigraph converted to '[' character}} expected-warning {{trigraph converted to ']' character}} expected-warning {{trigraph converted to '|' character}} expected-warning {{trigraph converted to '|' character}} expected-warning {{trigraph converted to '[' character}} expected-warning {{trigraph converted to ']' character}}
|
|
@ -0,0 +1,8 @@
|
|||
// RUN: clang-cc -fsyntax-only -trigraphs -Wtrigraphs -verify %s
|
||||
|
||||
char a[] =
|
||||
"?? ??\"??#??$??%??&??*??+??,??.??0??1??2??3??4??5??6"
|
||||
"??7??8??9??:??;?????@??A??B??C??D??E??F??G??H??I??J"
|
||||
"??K??L??M??N??O??P??Q??R??S??T??U??V??W??X??Y??Z??["
|
||||
"??\\??]??^??_??`??a??b??c??d??e??f??g??h??i??j??k??l"
|
||||
"??m??n??o??p??q??r??s??t??u??v??w??x??y??z??{??|??}??~";
|
Loading…
Reference in New Issue