diff options
author | Andy Gibbs <andyg1001@hotmail.co.uk> | 2016-04-01 19:02:20 +0000 |
---|---|---|
committer | Andy Gibbs <andyg1001@hotmail.co.uk> | 2016-04-01 19:02:20 +0000 |
commit | 6f8cfccbd36de601b6f35a854cb0dba5b9757495 (patch) | |
tree | 4d424e7ba66e2fa8707033736822d609e9efefcb /clang/test/Preprocessor/stringize_misc.c | |
parent | dd711b93e0bc525119ef82e4647d2a096ddb624e (diff) | |
download | bcm5719-llvm-6f8cfccbd36de601b6f35a854cb0dba5b9757495.tar.gz bcm5719-llvm-6f8cfccbd36de601b6f35a854cb0dba5b9757495.zip |
Diagnose missing macro argument following charize operator.
For completeness, add a test-case for the equivalent stringize operator
diagnostic too.
llvm-svn: 265177
Diffstat (limited to 'clang/test/Preprocessor/stringize_misc.c')
-rw-r--r-- | clang/test/Preprocessor/stringize_misc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/stringize_misc.c b/clang/test/Preprocessor/stringize_misc.c index 6c2c78d17ac..fc7253e5049 100644 --- a/clang/test/Preprocessor/stringize_misc.c +++ b/clang/test/Preprocessor/stringize_misc.c @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s +#ifdef TEST1 +// RUN: %clang_cc1 -E %s -DTEST1 | FileCheck -strict-whitespace %s #define M(x, y) #x #y @@ -28,3 +29,13 @@ START_END( {a=1 , b=2;} ) /* braces are not parentheses */ M(a COMMA b, (a, b)) // CHECK: "a COMMA b" "(a, b)" +#endif + +#ifdef TEST2 +// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST2 + +#define HASH # +#define INVALID() # +// expected-error@-1{{'#' is not followed by a macro parameter}} + +#endif |