diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:20 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:20 +0000 |
commit | 3a387441ae339363ee5b254658f295e97bd9e913 (patch) | |
tree | 4e39ccc7508ba46e5fa86a101f215ff736cc894e /lib/Sema/SemaDeclAttr.cpp | |
parent | 51c3b79caa493a53d324190c0d7e3cd1fe93d4f3 (diff) |
When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 940f5a86a6..e5ea1610ad 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -4031,7 +4031,7 @@ void Sema::EmitDeprecationWarning(NamedDecl *D, StringRef Message, } // Otherwise, don't warn if our current context is deprecated. - if (isDeclDeprecated(cast<Decl>(CurContext))) + if (isDeclDeprecated(cast<Decl>(getCurLexicalContext()))) return; if (!Message.empty()) Diag(Loc, diag::warn_deprecated_message) << D->getDeclName() |