summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index cdb69305360..f5681af0fa0 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -604,6 +604,8 @@ void Sema::CheckForFileScopedRedefinitions(Scope *S, VarDecl *VD) {
VD->getStorageClass() != VarDecl::PrivateExtern) {
Diag(VD->getLocation(), diag::err_redefinition) << VD->getDeclName();
Diag(OldDecl->getLocation(), diag::note_previous_definition);
+ // One redefinition error is enough.
+ break;
}
}
}
OpenPOWER on IntegriCloud