aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Driver/ASTConsumers.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index d58eca5d35..0ae88dd0c8 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -652,6 +652,9 @@ ASTConsumer* clang::CreateGRSimpleVals(Diagnostic &Diags,
void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
+ if (Diags.hasErrorOccurred())
+ return;
+
SourceLocation Loc = CD.getLocation();
if (!Loc.isFileID() ||