summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-14 15:31:12 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-14 15:31:12 +0000
commit041b084f736e875a24e3a089268e8b4747ac363e (patch)
tree59a5a70d49990ef6470f4ce35f9200eb64c58b75 /clang/test
parent98ea7f6737834029b60081105b73e6f5c7c420e9 (diff)
downloadbcm5719-llvm-041b084f736e875a24e3a089268e8b4747ac363e.tar.gz
bcm5719-llvm-041b084f736e875a24e3a089268e8b4747ac363e.zip
When declaring an out-of-line template, attempt to rebuild any types
within the template parameter list that may have changed now that we know the current instantiation. Fixes <rdar://problem/10194295>. llvm-svn: 141954
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/current-instantiation.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/current-instantiation.cpp b/clang/test/SemaTemplate/current-instantiation.cpp
index fe7213f1438..ccef811e222 100644
--- a/clang/test/SemaTemplate/current-instantiation.cpp
+++ b/clang/test/SemaTemplate/current-instantiation.cpp
@@ -215,3 +215,23 @@ namespace PR9255 {
};
};
}
+
+namespace rdar10194295 {
+ template<typename XT>
+ class X {
+ public:
+ enum Enum { Yes, No };
+ template<Enum> void foo();
+ template<Enum> class Inner;
+ };
+
+ template<typename XT>
+ template<typename X<XT>::Enum>
+ void X<XT>::foo()
+ {
+ }
+
+ template<typename XT>
+ template<typename X<XT>::Enum>
+ class X<XT>::Inner { };
+}
OpenPOWER on IntegriCloud