[llvm] r209393 - MC: initialise MCAsmParser variable
Saleem Abdulrasool
compnerd at compnerd.org
Wed May 21 23:03:00 PDT 2014
Author: compnerd
Date: Thu May 22 01:02:59 2014
New Revision: 209393
URL: http://llvm.org/viewvc/llvm-project?rev=209393&view=rev
Log:
MC: initialise MCAsmParser variable
Properly initialise HadError to false during construction. Detected as
use-of-uninitialised variable by MSan!
Modified:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=209393&r1=209392&r2=209393&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Thu May 22 01:02:59 2014
@@ -498,8 +498,8 @@ AsmParser::AsmParser(SourceMgr &_SM, MCC
const MCAsmInfo &_MAI)
: Lexer(_MAI), Ctx(_Ctx), Out(_Out), MAI(_MAI), SrcMgr(_SM),
PlatformParser(nullptr), CurBuffer(0), MacrosEnabledFlag(true),
- CppHashLineNumber(0), AssemblerDialect(~0U), IsDarwin(false),
- ParsingInlineAsm(false) {
+ HadError(false), CppHashLineNumber(0), AssemblerDialect(~0U),
+ IsDarwin(false), ParsingInlineAsm(false) {
// Save the old handler.
SavedDiagHandler = SrcMgr.getDiagHandler();
SavedDiagContext = SrcMgr.getDiagContext();
More information about the llvm-commits
mailing list