[cfe-commits] r64081 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/tentative-decls.c
Sebastian Redl
sebastian.redl at getdesigned.at
Sun Feb 8 02:49:48 PST 2009
Author: cornedbee
Date: Sun Feb 8 04:49:44 2009
New Revision: 64081
URL: http://llvm.org/viewvc/llvm-project?rev=64081&view=rev
Log:
Fix redundant errors for redefinitions with multiple existing definitions.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/Sema/tentative-decls.c
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=64081&r1=64080&r2=64081&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sun Feb 8 04:49:44 2009
@@ -604,6 +604,8 @@
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;
}
}
}
Modified: cfe/trunk/test/Sema/tentative-decls.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/tentative-decls.c?rev=64081&r1=64080&r2=64081&view=diff
==============================================================================
--- cfe/trunk/test/Sema/tentative-decls.c (original)
+++ cfe/trunk/test/Sema/tentative-decls.c Sun Feb 8 04:49:44 2009
@@ -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[];
More information about the cfe-commits
mailing list