]> granicus.if.org Git - clang/commitdiff
Properly initialize the parser_crash debug token.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 8 Mar 2015 19:28:24 +0000 (19:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 8 Mar 2015 19:28:24 +0000 (19:28 +0000)
Found by msan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231605 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Pragma.cpp

index 8ed832893771ecd4f20d07749f622b788dd61e7c..0d9c508fd56ee69b9b55039048e1eece17847f71 100644 (file)
@@ -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");