diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-14 01:12:20 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-10-14 01:12:20 +0000 |
commit | 869d37e33388c353b5651b16eb1ecccf7132776e (patch) | |
tree | 44632a885b9b6234535e7b7c7a85b6a648d50e71 /clang/test/CodeGenCXX/default-arg-temps.cpp | |
parent | f70847deeff88c97d5a8898549ce8d4b4ad02b9e (diff) | |
download | bcm5719-llvm-869d37e33388c353b5651b16eb1ecccf7132776e.tar.gz bcm5719-llvm-869d37e33388c353b5651b16eb1ecccf7132776e.zip |
Use SubstInitializer instead of SubstExpr when instantiating a default
argument, in order to correctly instantiate the initializer.
llvm-svn: 284184
Diffstat (limited to 'clang/test/CodeGenCXX/default-arg-temps.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/default-arg-temps.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/default-arg-temps.cpp b/clang/test/CodeGenCXX/default-arg-temps.cpp index 6a7f43a5128..f7b46818e39 100644 --- a/clang/test/CodeGenCXX/default-arg-temps.cpp +++ b/clang/test/CodeGenCXX/default-arg-temps.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct T { T(); @@ -71,3 +71,10 @@ namespace test1 { D d; } + +namespace test2 { + // CHECK: define linkonce_odr void @_ZN5test21AIiED2Ev( + template <typename T> struct A { A() {} ~A() {} }; + template <typename> void f(const A<int> & = {}) {} + void g() { f<int>(); } +} |