summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-local-class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-01-04 23:45:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-01-04 23:45:01 +0000
commitece4758bf28b5be96ef0123ad79456a13e8518a1 (patch)
tree7e0b2b55ba718ac6bc98546707624ba8bdfb40db /clang/test/SemaTemplate/instantiate-local-class.cpp
parentdd9c27b3bf77b947ba0bb08ed1ba1ae673b9f067 (diff)
downloadbcm5719-llvm-ece4758bf28b5be96ef0123ad79456a13e8518a1.tar.gz
bcm5719-llvm-ece4758bf28b5be96ef0123ad79456a13e8518a1.zip
Only instantiate members of nested classes in local classes once, rather than once per enclosing class.
llvm-svn: 291034
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-local-class.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-local-class.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-local-class.cpp b/clang/test/SemaTemplate/instantiate-local-class.cpp
index a61af7a5af3..eaff4c4bbc8 100644
--- a/clang/test/SemaTemplate/instantiate-local-class.cpp
+++ b/clang/test/SemaTemplate/instantiate-local-class.cpp
@@ -475,3 +475,14 @@ namespace rdar23721638 {
}
template void bar<A>(); // expected-note {{in instantiation}}
}
+
+namespace anon_union_default_member_init {
+ template<typename T> void f() {
+ struct S {
+ union {
+ int i = 0;
+ };
+ };
+ }
+ void g() { f<int>(); }
+}
OpenPOWER on IntegriCloud