summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/cxx1y-variable-templates_in_class.cpp')
-rw-r--r--test/SemaCXX/cxx1y-variable-templates_in_class.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx1y-variable-templates_in_class.cpp b/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
index 123fcff..65e2d6b 100644
--- a/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
+++ b/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
@@ -327,3 +327,14 @@ struct S {
static int f : I; // expected-error {{static member 'f' cannot be a bit-field}}
};
}
+
+namespace b20896909 {
+ // This used to crash.
+ template<typename T> struct helper {};
+ template<typename T> class A {
+ template <typename> static helper<typename T::error> x; // expected-error {{type 'int' cannot be used prior to '::' because it has no members}}
+ };
+ void test() {
+ A<int> ai; // expected-note {{in instantiation of}}
+ }
+}
OpenPOWER on IntegriCloud