summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/instantiate-init-list.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-11-09 03:59:26 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-11-09 03:59:26 +0000
commitcb298768393a47b8e40c797bd9a2355f193ebe14 (patch)
treeb8e2e80422eae5833cb61c4fc88fec1d5fdaac37 /clang/test/CodeGenCXX/instantiate-init-list.cpp
parente5eb726e2e82136cce6006a99bb95dde484f9f93 (diff)
downloadbcm5719-llvm-cb298768393a47b8e40c797bd9a2355f193ebe14.tar.gz
bcm5719-llvm-cb298768393a47b8e40c797bd9a2355f193ebe14.zip
Add hack to make the given testcase work. As far as I can tell, this change is
reasonably safe, but it doesn't seem like the right solution. llvm-svn: 86508
Diffstat (limited to 'clang/test/CodeGenCXX/instantiate-init-list.cpp')
-rw-r--r--clang/test/CodeGenCXX/instantiate-init-list.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/instantiate-init-list.cpp b/clang/test/CodeGenCXX/instantiate-init-list.cpp
new file mode 100644
index 00000000000..7d5458af1f5
--- /dev/null
+++ b/clang/test/CodeGenCXX/instantiate-init-list.cpp
@@ -0,0 +1,13 @@
+// RUN: clang-cc %s -emit-llvm-only -verify
+
+struct F {
+ void (*x)();
+};
+void G();
+template<class T> class A {
+ A();
+};
+template<class T> A<T>::A() {
+ static F f = { G };
+}
+A<int> a;
OpenPOWER on IntegriCloud