summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
-rw-r--r--clang/test/Sema/tentative-decls.c2
2 files changed, 2 insertions, 2 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;
}
}
}
diff --git a/clang/test/Sema/tentative-decls.c b/clang/test/Sema/tentative-decls.c
index 6390d9ca4dc..0e4b13a8434 100644
--- a/clang/test/Sema/tentative-decls.c
+++ b/clang/test/Sema/tentative-decls.c
@@ -1,6 +1,4 @@
// RUN: clang %s -verify -fsyntax-only
-// XFAIL
-// fails due to exact diagnostic matching
const int a [1] = {1};
extern const int a[];
OpenPOWER on IntegriCloud