summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-24 21:22:47 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-24 21:22:47 +0000
commitdc76403cc1dfdb801fc6e35750f72df234dac633 (patch)
tree88397ae6e102e5f5ac0adb1105357f0abd673dc4 /clang/test
parent023da0d43a96d25a2a66e1bd4d97b38e953351a4 (diff)
downloadbcm5719-llvm-dc76403cc1dfdb801fc6e35750f72df234dac633.tar.gz
bcm5719-llvm-dc76403cc1dfdb801fc6e35750f72df234dac633.zip
When pulling apart an initializer that involves a CXXConstructExpr, do
not pick apart a CXXTemporaryObjectExpr because such an object construction was explicitly written in the source code. Fixes PR6657. llvm-svn: 99427
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/instantiate-init.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-init.cpp b/clang/test/SemaTemplate/instantiate-init.cpp
index 16ecc4758ab..e292aa3c5f7 100644
--- a/clang/test/SemaTemplate/instantiate-init.cpp
+++ b/clang/test/SemaTemplate/instantiate-init.cpp
@@ -37,3 +37,21 @@ namespace PR6457 {
};
B<int> b;
}
+
+namespace PR6657 {
+ struct X
+ {
+ X (int, int) { }
+ };
+
+ template <typename>
+ void f0()
+ {
+ X x = X(0, 0);
+ }
+
+ void f1()
+ {
+ f0<int>();
+ }
+}
OpenPOWER on IntegriCloud