aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-01-16 19:32:21 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-01-16 19:32:21 +0000
commit31672b1745195d709b641f1c0f44e203742fa73b (patch)
tree12fbebdd3494a696805c698f0b60668fd5038e2c /lib/Lex/Preprocessor.cpp
parentf0e00046711280d494f3ef2d85ae67a442b97406 (diff)
No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 9ce4874f63..ccb2df0602 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -69,7 +69,8 @@ Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
CodeCompletionFile(0), CodeCompletionOffset(0), CodeCompletionReached(0),
SkipMainFilePreamble(0, true), CurPPLexer(0),
CurDirLookup(0), CurLexerKind(CLK_Lexer), Callbacks(0), Listener(0),
- MacroArgCache(0), Record(0), MIChainHead(0), MICache(0)
+ MacroArgCache(0), Record(0), MIChainHead(0), MICache(0),
+ ParsingIfOrElifDirective(false)
{
OwnsHeaderSearch = OwnsHeaders;