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.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index cd6ff6ce582..8af7e5a1d03 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2223,11 +2223,7 @@ static void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {
S.CheckForFunctionRedefinition(FD, cast<FunctionDecl>(Def));
else {
VarDecl *VD = cast<VarDecl>(New);
- unsigned Diag = cast<VarDecl>(Def)->isThisDeclarationADefinition() ==
- VarDecl::TentativeDefinition
- ? diag::err_alias_after_tentative
- : diag::err_redefinition;
- S.Diag(VD->getLocation(), Diag) << VD->getDeclName();
+ S.Diag(VD->getLocation(), diag::err_redefinition) << VD->getDeclName();
S.Diag(Def->getLocation(), diag::note_previous_definition);
VD->setInvalidDecl();
}
OpenPOWER on IntegriCloud