summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-member-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-20 19:42:02 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-20 19:42:02 +0000
commit51c538bee4d754b0059f434064d5b9466b9026ff (patch)
tree4cceb09f0e6cfeabfd9105ba5029b99263887fd0 /clang/test/SemaTemplate/instantiate-member-template.cpp
parent6c3b71195a6221b80ceab19cec2fee3814ba893a (diff)
downloadbcm5719-llvm-51c538bee4d754b0059f434064d5b9466b9026ff.tar.gz
bcm5719-llvm-51c538bee4d754b0059f434064d5b9466b9026ff.zip
Teach FixOverloadedFunctionReference to build new expression ASTs rather
than tweaking existing ASTs, since we were (*gasp*) stomping on ASTs within templates. I'm glad we found this little stick of TNT early... llvm-svn: 89475
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-member-template.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-member-template.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-member-template.cpp b/clang/test/SemaTemplate/instantiate-member-template.cpp
index 95556bcc221..04ced926341 100644
--- a/clang/test/SemaTemplate/instantiate-member-template.cpp
+++ b/clang/test/SemaTemplate/instantiate-member-template.cpp
@@ -116,3 +116,18 @@ struct X2 {
X2<int&> x2a; // expected-note{{instantiation}}
X2<float> x2b; // expected-note{{instantiation}}
+
+namespace N0 {
+ template<typename T>
+ struct X0 { };
+
+ struct X1 {
+ template<typename T> void f(X0<T>& vals) { g(vals); }
+ template<typename T> void g(X0<T>& vals) { }
+ };
+
+ void test(X1 x1, X0<int> x0i, X0<long> x0l) {
+ x1.f(x0i);
+ x1.f(x0l);
+ }
+}
OpenPOWER on IntegriCloud