argument, in order to correctly instantiate the initializer.
llvm-svn: 284184
// default argument expression appears.
ContextRAII SavedContext(*this, FD);
LocalInstantiationScope Local(*this);
- Result = SubstExpr(UninstExpr, MutiLevelArgList);
+ Result = SubstInitializer(UninstExpr, MutiLevelArgList,
+ /*DirectInit*/false);
}
if (Result.isInvalid())
return ExprError();
-// 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();
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>(); }
+}