summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-function-2.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-07-17 15:40:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-07-17 15:40:56 +0000
commit180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (patch)
tree2097d084eb235c0b12c0bff3445f4ec7bbaa8a12 /test/SemaTemplate/instantiate-function-2.cpp
parent29cafa66ad3878dbb9f82615f19fa0bded2e443c (diff)
Diffstat (limited to 'test/SemaTemplate/instantiate-function-2.cpp')
-rw-r--r--test/SemaTemplate/instantiate-function-2.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-function-2.cpp b/test/SemaTemplate/instantiate-function-2.cpp
index ebc0ef3a9f961..087ede2b89cbb 100644
--- a/test/SemaTemplate/instantiate-function-2.cpp
+++ b/test/SemaTemplate/instantiate-function-2.cpp
@@ -31,3 +31,36 @@ namespace UsedAttr {
foo<int>(); // expected-note{{instantiation of}}
}
}
+
+namespace PR9654 {
+ typedef void ftype(int);
+
+ template<typename T>
+ ftype f;
+
+ void g() {
+ f<int>(0);
+ }
+}
+
+namespace AliasTagDef {
+ template<typename T>
+ T f() {
+ using S = struct { // expected-warning {{C++0x}}
+ T g() {
+ return T();
+ }
+ };
+ return S().g();
+ }
+
+ int n = f<int>();
+}
+
+namespace PR10273 {
+ template<typename T> void (f)(T t) {}
+
+ void g() {
+ (f)(17);
+ }
+}