From: Benjamin Kramer Date: Sun, 8 Mar 2015 19:28:24 +0000 (+0000) Subject: Properly initialize the parser_crash debug token. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa2027529fa1f18ae455facf6103ec9bdb0c143c;p=clang Properly initialize the parser_crash debug token. Found by msan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231605 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 8ed8328937..0d9c508fd5 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -870,7 +870,9 @@ struct PragmaDebugHandler : public PragmaHandler { LLVM_BUILTIN_TRAP; } else if (II->isStr("parser_crash")) { Token Crasher; + Crasher.startToken(); Crasher.setKind(tok::annot_pragma_parser_crash); + Crasher.setAnnotationRange(SourceRange(Tok.getLocation())); PP.EnterToken(Crasher); } else if (II->isStr("llvm_fatal_error")) { llvm::report_fatal_error("#pragma clang __debug llvm_fatal_error");