aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index cdb6930536..f5681af0fa 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/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;
}
}
}