From 6da83624e44a4066c31524d60d2226de55c698a0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 7 Jan 2010 00:17:44 +0000 Subject: Whenever we emit a typo-correction diagnostic, also emit a note pointing to the declaration that we found that has that name (if it is unique). llvm-svn: 92877 --- clang/lib/Sema/SemaDeclCXX.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Sema/SemaDeclCXX.cpp') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 2e6f8bc6876..7ae0440b409 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1072,6 +1072,8 @@ Sema::ActOnMemInitializer(DeclPtrTy ConstructorD, << MemberOrBase << true << R.getLookupName() << CodeModificationHint::CreateReplacement(R.getNameLoc(), R.getLookupName().getAsString()); + Diag(Member->getLocation(), diag::note_previous_decl) + << Member->getDeclName(); return BuildMemberInitializer(Member, (Expr**)Args, NumArgs, IdLoc, LParenLoc, RParenLoc); -- cgit v1.2.3