r231605 - Properly initialize the parser_crash debug token.
Benjamin Kramer
benny.kra at googlemail.com
Sun Mar 8 12:28:24 PDT 2015
Author: d0k
Date: Sun Mar 8 14:28:24 2015
New Revision: 231605
URL: http://llvm.org/viewvc/llvm-project?rev=231605&view=rev
Log:
Properly initialize the parser_crash debug token.
Found by msan.
Modified:
cfe/trunk/lib/Lex/Pragma.cpp
Modified: cfe/trunk/lib/Lex/Pragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Pragma.cpp?rev=231605&r1=231604&r2=231605&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Pragma.cpp (original)
+++ cfe/trunk/lib/Lex/Pragma.cpp Sun Mar 8 14:28:24 2015
@@ -870,7 +870,9 @@ struct PragmaDebugHandler : public Pragm
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");
More information about the cfe-commits
mailing list