llvm-project/clang/test/Preprocessor/expr_define_expansion.c
Eli Friedman b3bfd84ebb A couple fixes for preprocessor expressions:
1. Be more tolerant of comments in -CC (comment-preserving) mode.  We were missing a few cases.

2. Make sure to expand the second FOO in "#if defined FOO FOO".  (See also
r97253, which addressed the case of "#if defined(FOO FOO".)

Fixes PR10286.

llvm-svn: 136748
2011-08-03 00:04:13 +00:00

6 lines
92 B
C

// RUN: %clang_cc1 %s -E -CC -pedantic -verify
#define FOO && 1
#if defined FOO FOO
#endif