diff options
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 | ||||
-rw-r--r-- | test/Sema/tentative-decls.c | 2 |
2 files changed, 2 insertions, 2 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; } } } diff --git a/test/Sema/tentative-decls.c b/test/Sema/tentative-decls.c index 6390d9ca4d..0e4b13a843 100644 --- a/test/Sema/tentative-decls.c +++ b/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[]; |