History log of /external/clang/test/Preprocessor/_Pragma-in-macro-arg.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a06642a3a3a8a9c82d6c636cd3f2c18c4fac66c4 04-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] In Preprocessor::CachingLex() check whether there were more tokens
cached during the non-cached lex, otherwise we are going to drop them.

Fixes a bogus "_Pragma takes a parenthesized string literal" error when
expanding consecutive _Pragmas in a macro argument.

Part of rdar://11168596

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/_Pragma-in-macro-arg.c
14e645557ae91c6770d62beb00a1c522e0bfd5d6 03-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Correct handling of _Pragma macro inside a macro argument.

If we are pre-expanding a macro argument don't actually "activate"
the pragma at that point, activate the pragma whenever we encounter
it again in the token stream.
This ensures that we will activate it in the correct location
or that we will ignore it if it never enters the token stream, e.g:

\#define EMPTY(x)
\#define INACTIVE(x) EMPTY(x)
INACTIVE(_Pragma("clang diagnostic ignored \"-Wconversion\""))

This also fixes the crash in rdar://11168596.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/_Pragma-in-macro-arg.c