summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-function-2.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-15 21:18:27 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-15 21:18:27 +0000
commit8d2ad873e7077bf4700bfbc8adfe3bc9c68baf93 (patch)
tree494c1dcb6c385d2c214e868c55f5821ea748792f /clang/test/SemaTemplate/instantiate-function-2.cpp
parent6802ed99684f42e0e5eb604e33f51e5d5e616f8f (diff)
downloadbcm5719-llvm-8d2ad873e7077bf4700bfbc8adfe3bc9c68baf93.tar.gz
bcm5719-llvm-8d2ad873e7077bf4700bfbc8adfe3bc9c68baf93.zip
Make sure that we use the canonical type for the names of instantiated
constructors and destructors. This is a requirement of DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing, so it should have been caught much earlier :( Big thanks to Anders for the test case. llvm-svn: 71895
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-function-2.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-function-2.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-function-2.cpp b/clang/test/SemaTemplate/instantiate-function-2.cpp
new file mode 100644
index 00000000000..51a60146d46
--- /dev/null
+++ b/clang/test/SemaTemplate/instantiate-function-2.cpp
@@ -0,0 +1,12 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+template <typename T> struct S {
+ S() { }
+ S(T t);
+};
+
+template struct S<int>;
+
+void f() {
+ S<int> s1;
+ S<int> s2(10);
+}
OpenPOWER on IntegriCloud