summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-04-23 17:27:19 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-04-23 17:27:19 +0000
commitdbbdd2fe50e05c3f0da240b774e4d267e3c980cf (patch)
tree4e9f7fc92bcf59a4db9e5436868689ba3b313cde /clang/lib/Sema/SemaDeclAttr.cpp
parenta7d337d19604644326843a516a05e9984e13af01 (diff)
downloadbcm5719-llvm-dbbdd2fe50e05c3f0da240b774e4d267e3c980cf.tar.gz
bcm5719-llvm-dbbdd2fe50e05c3f0da240b774e4d267e3c980cf.zip
"note" location of forward class used as receiver of
a 'deprecated' selector in the diagnostics for the selector. // rdar://9309223 llvm-svn: 130062
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 244f70a2dbe..746c5dbb374 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/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);
+ }
}
}
OpenPOWER on IntegriCloud