aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-05 06:19:09 +0000
committerChris Lattner <sabre@nondot.org>2008-08-05 06:19:09 +0000
commit4fef81d718ca1b91ce2adef52db91a35f86e9bbd (patch)
tree378bccc75780ce1d178f43d3eca1c7f12c974485 /lib/Parse/Parser.cpp
parenta80f8749f2968d19595ca2544114932bf0ca2c11 (diff)
Fix rdar://6124613 a crash on invalid code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 9eab4fda15..05abfe1a77 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -31,14 +31,16 @@ Parser::Parser(Preprocessor &pp, Action &actions)
Action::~Action() {}
-void Parser::Diag(SourceLocation Loc, unsigned DiagID,
+bool Parser::Diag(SourceLocation Loc, unsigned DiagID,
const std::string &Msg) {
Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID, &Msg, 1);
+ return true;
}
-void Parser::Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R) {
+bool Parser::Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R) {
Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID, 0, 0,
&R, 1);
+ return true;
}