]> granicus.if.org Git - clang/commitdiff
Properly initialize Preprocessor::CurLexerKind to avoid use of uninitialized variable.
authorZhongxing Xu <xuzhongxing@foxmail.com>
Mon, 26 Sep 2011 03:37:43 +0000 (03:37 +0000)
committerZhongxing Xu <xuzhongxing@foxmail.com>
Mon, 26 Sep 2011 03:37:43 +0000 (03:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140514 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 2937b6066edc2c1d5297564c964c3c23dd1d7123..eeb4be1250cb678af99d877e234a9459ff41f4f1 100644 (file)
@@ -61,8 +61,8 @@ Preprocessor::Preprocessor(DiagnosticsEngine &diags, LangOptions &opts,
     Identifiers(opts, IILookup), CodeComplete(0),
     CodeCompletionFile(0), CodeCompletionOffset(0), CodeCompletionReached(0),
     SkipMainFilePreamble(0, true), CurPPLexer(0), 
-    CurDirLookup(0), Callbacks(0), MacroArgCache(0), Record(0), MIChainHead(0),
-    MICache(0) 
+    CurDirLookup(0), CurLexerKind(CLK_Lexer), Callbacks(0), MacroArgCache(0), 
+    Record(0), MIChainHead(0), MICache(0) 
 {
   OwnsHeaderSearch = OwnsHeaders;