PR19152: If a variable template's type involves 'auto', instantiate the
initializer with the variable in order to determine the type.
llvm-svn: 204015
diff --git a/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp b/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
index 526bef0..37d5bf3 100644
--- a/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
+++ b/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
@@ -441,3 +441,10 @@
template<typename T> int a;
int a<int>; // expected-error {{requires 'template<>'}}
}
+
+namespace PR19152 {
+#ifndef PRECXX11
+ template<typename T> const auto x = 1;
+ static_assert(x<int> == 1, "");
+#endif
+}