llvm-project/clang/test/Preprocessor/comment_save_if.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

12 lines
195 B
C

// RUN: %clang_cc1 %s -E -CC -pedantic -verify
#if 1 /*bar */
#endif /*foo*/
#if /*foo*/ defined /*foo*/ FOO /*foo*/
#if /*foo*/ defined /*foo*/ ( /*foo*/ FOO /*foo*/ ) /*foo*/
#endif
#endif