summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-04-03 16:47:40 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-04-03 16:47:40 +0000
commitf1b64c61983db9ebe3430587cc5f27c76c0d3c19 (patch)
tree24574ecb05273e175ce24ac6061f897546734819 /clang/lib/Lex/Preprocessor.cpp
parentffa52d2ae2baaa30e60e16580c08262cb091d5bf (diff)
downloadbcm5719-llvm-f1b64c61983db9ebe3430587cc5f27c76c0d3c19.tar.gz
bcm5719-llvm-f1b64c61983db9ebe3430587cc5f27c76c0d3c19.zip
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. llvm-svn: 153959
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index f7f63ee01fb..06e5685a8b6 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -135,6 +135,7 @@ void Preprocessor::Initialize(const TargetInfo &Target) {
// Macro expansion is enabled.
DisableMacroExpansion = false;
InMacroArgs = false;
+ InMacroArgPreExpansion = false;
NumCachedTokenLexers = 0;
CachedLexPos = 0;
OpenPOWER on IntegriCloud