summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCXXScopeSpec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-20 03:28:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-20 03:28:47 +0000
commit95aafb2453e1fecec8dcfd9e125cd78277f45859 (patch)
tree60da25be6213120ae69b4a36b7478f7d8ef57a06 /lib/Sema/SemaCXXScopeSpec.cpp
parent82c8ca1eeba6ccdf34916803150df369df3b7ae5 (diff)
downloadclang-95aafb2453e1fecec8dcfd9e125cd78277f45859.tar.gz
Add -Wc++98-compat warning for enumerations in nested name specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXScopeSpec.cpp')
-rw-r--r--lib/Sema/SemaCXXScopeSpec.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp
index a9b6536e7d..dfd59bfe4f 100644
--- a/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/lib/Sema/SemaCXXScopeSpec.cpp
@@ -596,6 +596,9 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *S,
llvm_unreachable("Unhandled TypeDecl node in nested-name-specifier");
}
+ if (T->isEnumeralType())
+ Diag(IdentifierLoc, diag::warn_cxx98_compat_enum_nested_name_spec);
+
SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
CCLoc);
return false;