summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCXXScopeSpec.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-11-14 22:34:56 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-11-14 22:34:56 +0000
commit00dccd63cd9db239052a06b113eb28c9b66144fc (patch)
treee84fa7df43d40c96bb885c8c2d6b89c7d2fc3f94 /lib/Sema/SemaCXXScopeSpec.cpp
parent769c06275fe928e97a21c32cf2edc60bb7a0d16d (diff)
downloadclang-00dccd63cd9db239052a06b113eb28c9b66144fc.tar.gz
[c++1z] Support [[deprecated]] attributes on namespaces. Note that it only applies to situations where the namespace is mentioned. Thus, use on anonymous namespaces is diagnosed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXScopeSpec.cpp')
-rw-r--r--lib/Sema/SemaCXXScopeSpec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp
index 0193e80a75..49e8a155c3 100644
--- a/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/lib/Sema/SemaCXXScopeSpec.cpp
@@ -652,6 +652,10 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *S,
// don't extend the nested-name-specifier. Just return now.
if (ErrorRecoveryLookup)
return false;
+
+ // The use of a nested name specifier may trigger deprecation warnings.
+ DiagnoseUseOfDecl(SD, CCLoc);
+
if (NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(SD)) {
SS.Extend(Context, Namespace, IdentifierLoc, CCLoc);