diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-22 19:34:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-22 19:34:51 +0000 |
commit | c21d9e4766a6200dc4b2aaba3590b49114d19acd (patch) | |
tree | 6c14df7141c701c291f734067a9e50759f64aa78 /test/Preprocessor/ifdef-recover.c | |
parent | 9e18d3ed84a95be2bc42f1ce65d3bab2ee8a1e27 (diff) | |
download | clang-c21d9e4766a6200dc4b2aaba3590b49114d19acd.tar.gz |
Fix PR1936, a crash on malformed #if. Thanks to Neil for
noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/ifdef-recover.c')
-rw-r--r-- | test/Preprocessor/ifdef-recover.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Preprocessor/ifdef-recover.c b/test/Preprocessor/ifdef-recover.c index 2009514f5e..bd1d507bbc 100644 --- a/test/Preprocessor/ifdef-recover.c +++ b/test/Preprocessor/ifdef-recover.c @@ -1,7 +1,15 @@ -/* RUN: clang %s 2>&1 | grep error: | count 1 +/* RUN: clang %s 2>&1 | grep error: | count 3 */ #ifdef #endif +/* End of function-like macro invocation in #ifdef */ +/* PR1936 */ +#define f(x) x +#if f(2 +#endif + +int x; + |