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, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9ed37f604fc..69e9ff9e9c6 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -281,6 +281,9 @@ bool Sema::DiagnoseUnknownTypeName(const IdentifierInfo &II,
else
llvm_unreachable("could not have corrected a typo here");
+ Diag(Result->getLocation(), diag::note_previous_decl)
+ << Result->getDeclName();
+
SuggestedType = getTypeName(*Result->getIdentifier(), IILoc, S, SS);
return true;
}
@@ -580,6 +583,9 @@ ObjCInterfaceDecl *Sema::getObjCInterfaceDecl(IdentifierInfo *&Id,
<< Id << IDecl->getDeclName()
<< CodeModificationHint::CreateReplacement(RecoverLoc,
IDecl->getNameAsString());
+ Diag(IDecl->getLocation(), diag::note_previous_decl)
+ << IDecl->getDeclName();
+
Id = IDecl->getIdentifier();
}
}
OpenPOWER on IntegriCloud