diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-09 18:29:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-09 18:29:00 +0000 |
commit | a8ab71bad7826ef51a90fba29f50cc5a37eafadf (patch) | |
tree | 751b9f5548154a16663f83f6cbe73f19fa33e237 /clang | |
parent | c146c780600a8d3a2c3d94a889c13d2213221ce4 (diff) | |
download | bcm5719-llvm-a8ab71bad7826ef51a90fba29f50cc5a37eafadf.tar.gz bcm5719-llvm-a8ab71bad7826ef51a90fba29f50cc5a37eafadf.zip |
Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake
llvm-svn: 86570
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-member-template.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-member-template.cpp b/clang/test/SemaTemplate/instantiate-member-template.cpp index 36f3b6fd490..95556bcc221 100644 --- a/clang/test/SemaTemplate/instantiate-member-template.cpp +++ b/clang/test/SemaTemplate/instantiate-member-template.cpp @@ -103,3 +103,16 @@ void test_X1(int *ip, int i, double *dp) { X1<int*>::Inner4<int>::value = 17; i = X1<int*>::Inner4<int&>::value; // expected-note{{instantiation}} } + + +template<typename T> +struct X2 { + template<T *Ptr> // expected-error{{pointer to a reference}} + struct Inner; + + template<T Value> // expected-error{{cannot have type 'float'}} + struct Inner2; +}; + +X2<int&> x2a; // expected-note{{instantiation}} +X2<float> x2b; // expected-note{{instantiation}} |