summaryrefslogtreecommitdiffstats
path: root/clang/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
commit197a3016690474cd8440eb102bdd40590ee1bfd1 (patch)
tree0e816d6438604b31e75da170626ab9cd78039c51 /clang/lib/Parse/Parser.cpp
parent4983df37a74714d99f2db3bb04919087f9328ecc (diff)
downloadbcm5719-llvm-197a3016690474cd8440eb102bdd40590ee1bfd1.tar.gz
bcm5719-llvm-197a3016690474cd8440eb102bdd40590ee1bfd1.zip
Fix rdar://6124613 a crash on invalid code.
llvm-svn: 54340
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 9eab4fda151..05abfe1a77c 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud