diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-23 17:27:19 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-23 17:27:19 +0000 |
commit | 89ebaed91cca7fd296ec7804e4e9fb68949c1d0e (patch) | |
tree | 745ece7789edfabc38f289e8b5a3b86557ebb4c0 /lib/Sema/SemaDeclAttr.cpp | |
parent | 4a47e8d35dc1778ef7e428d9edd7676be67e725f (diff) |
"note" location of forward class used as receiver of
a 'deprecated' selector in the diagnostics for the
selector. // rdar://9309223
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 244f70a2db..746c5dbb37 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -3175,7 +3175,7 @@ void Sema::HandleDelayedDeprecationCheck(DelayedDiagnostic &DD, void Sema::EmitDeprecationWarning(NamedDecl *D, llvm::StringRef Message, SourceLocation Loc, - bool UnknownObjCClass) { + const ObjCInterfaceDecl *UnknownObjCClass) { // Delay if we're currently parsing a declaration. if (DelayedDiagnostics.shouldDelayDiagnostics()) { DelayedDiagnostics.add(DelayedDiagnostic::makeDeprecation(Loc, D, Message)); @@ -3191,7 +3191,9 @@ void Sema::EmitDeprecationWarning(NamedDecl *D, llvm::StringRef Message, else { if (!UnknownObjCClass) Diag(Loc, diag::warn_deprecated) << D->getDeclName(); - else + else { Diag(Loc, diag::warn_deprecated_fwdclass_message) << D->getDeclName(); + Diag(UnknownObjCClass->getLocation(), diag::note_forward_class); + } } } |