diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-28 18:52:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-28 18:52:02 +0000 |
commit | 74c95e20af4838152a63010292d1063835176711 (patch) | |
tree | 54b44949ec918a4e4cf54348021bdf8269319611 /clang/test/Lexer/constants.c | |
parent | 5406f5430bbe3abd213f5c6cac05434332dae970 (diff) | |
download | bcm5719-llvm-74c95e20af4838152a63010292d1063835176711.tar.gz bcm5719-llvm-74c95e20af4838152a63010292d1063835176711.zip |
implement -Wmultichar
llvm-svn: 70315
Diffstat (limited to 'clang/test/Lexer/constants.c')
-rw-r--r-- | clang/test/Lexer/constants.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/clang/test/Lexer/constants.c b/clang/test/Lexer/constants.c index c0465816336..f5fc9e1493e 100644 --- a/clang/test/Lexer/constants.c +++ b/clang/test/Lexer/constants.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: clang-cc -fsyntax-only -verify -pedantic -trigraphs %s int x = 000000080; // expected-error {{invalid digit}} @@ -13,3 +13,17 @@ float Y = 08.123456; // PR2252 #if -0x8000000000000000 // should not warn. #endif + + +char c[] = { + 'df', // expected-warning {{multi-character character constant}} + '\t', + '\\ +t', + '??!' // expected-warning {{trigraph converted to '|' character}} +}; + + +#pragma GCC diagnostic ignored "-Wmultichar" + +char d = 'df'; // no warning. |