Bug fix: note diagnosis on expression narrowing should say "variable template" instead of "static data member" when appropriate

llvm-svn: 188409
diff --git a/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp b/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
index 82e3c11..61fccac 100644
--- a/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
+++ b/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
@@ -126,7 +126,7 @@
   }
 #endif
   
-}  
+}
 
 namespace explicit_instantiation {
   template<typename T> 
@@ -321,6 +321,15 @@
   }
 }
 
+namespace narrowing {
+  template<typename T> T v = {1234};  // expected-warning {{implicit conversion from 'int' to 'char' changes value from 1234 to}}
+#ifdef CXX11
+  // expected-error@-2 {{constant expression evaluates to 1234 which cannot be narrowed to type 'char'}}\
+  // expected-note@-2 {{override this message by inserting an explicit cast}}
+#endif
+  int k = v<char>;        // expected-note {{in instantiation of variable template specialization 'narrowing::v<char>' requested here}}
+}
+
 namespace use_in_structs {
   // TODO:
 }