summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/_Pragma-in-macro-arg.c
Commit message (Collapse)AuthorAgeFilesLines
* [preprocessor] In Preprocessor::CachingLex() check whether there were more ↵Argyrios Kyrtzidis2012-04-041-1/+1
| | | | | | | | | | | | | 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 llvm-svn: 153994
* Correct handling of _Pragma macro inside a macro argument.Argyrios Kyrtzidis2012-04-031-0/+35
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. llvm-svn: 153959
OpenPOWER on IntegriCloud