Fix the recently-added warning about 'typename' and 'template'
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106161 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/typename-specifier.cpp b/test/SemaTemplate/typename-specifier.cpp
index e066475..4c788f6 100644
--- a/test/SemaTemplate/typename-specifier.cpp
+++ b/test/SemaTemplate/typename-specifier.cpp
@@ -15,20 +15,22 @@
 
 int i;
 
-typename N::A::type *ip1 = &i; // expected-warning{{'typename' refers to a non-dependent type name}}
-typename N::B::type *ip2 = &i; // expected-error{{no type named 'type' in 'N::B'}}
-typename N::C::type *ip3 = &i; // expected-error{{typename specifier refers to non-type member 'type'}}
+typename N::A::type *ip1 = &i; // expected-warning{{'typename' occurs outside of a template}}
+typename N::B::type *ip2 = &i; // expected-error{{no type named 'type' in 'N::B'}} \
+// expected-warning{{'typename' occurs outside of a template}}
+typename N::C::type *ip3 = &i; // expected-error{{typename specifier refers to non-type member 'type'}} \
+// expected-warning{{'typename' occurs outside of a template}}
 
 void test(double d) {
   typename N::A::type f(typename N::A::type(a)); // expected-warning{{parentheses were disambiguated as a function declarator}} \
-  // expected-warning 2{{'typename' refers to a non-dependent type name}}
+  // expected-warning 2{{'typename' occurs outside of a template}}
   int five = f(5);
   
   using namespace N;
-  for (typename A::type i = 0; i < 10; ++i) // expected-warning{{'typename' refers to a non-dependent type name}}
+  for (typename A::type i = 0; i < 10; ++i) // expected-warning{{'typename' occurs outside of a template}}
     five += 1;
 
-  const typename N::A::type f2(d); // expected-warning{{'typename' refers to a non-dependent type name}}
+  const typename N::A::type f2(d); // expected-warning{{'typename' occurs outside of a template}}
 }
 
 namespace N {