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
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp
index a9b6536..dfd59bf 100644
--- a/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/lib/Sema/SemaCXXScopeSpec.cpp
@@ -596,6 +596,9 @@
       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;