diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-13 20:38:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-13 20:38:43 +0000 |
commit | f8f945499c169b5bb24cfa55d3d22f5bb23cda79 (patch) | |
tree | 4ee7ba3ec187fc9896d8fa503dc77ef29506b911 /clang/test/Preprocessor/expr_invalid_tok.c | |
parent | d71f83a8cbe674bdfbada8c748b8e57af3d82a9a (diff) | |
download | bcm5719-llvm-f8f945499c169b5bb24cfa55d3d22f5bb23cda79.tar.gz bcm5719-llvm-f8f945499c169b5bb24cfa55d3d22f5bb23cda79.zip |
Fix PR2220, making diagnostics for unexpected tokens in pp expressions
more nice.
llvm-svn: 49619
Diffstat (limited to 'clang/test/Preprocessor/expr_invalid_tok.c')
-rw-r--r-- | clang/test/Preprocessor/expr_invalid_tok.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/expr_invalid_tok.c b/clang/test/Preprocessor/expr_invalid_tok.c new file mode 100644 index 00000000000..2918bc6536c --- /dev/null +++ b/clang/test/Preprocessor/expr_invalid_tok.c @@ -0,0 +1,10 @@ +// RUN: not clang -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression' +// RUN: not clang -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression' +// PR2220 + +#if 1 * * 2 +#endif + +#if 4 [ 2 +#endif + |