Add back the workaround since it lead to constructor conversion bugs :(

llvm-svn: 81917
This commit is contained in:
Anders Carlsson 2009-09-15 21:14:33 +00:00
parent 45068b3e29
commit c8bfc466f3
2 changed files with 22 additions and 0 deletions

View File

@ -3243,6 +3243,12 @@ Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor,
Expr *Arg;
if (i < NumArgs) {
Arg = Args[i];
// Pass the argument.
if (PerformCopyInitialization(Arg, ProtoArgType, "passing"))
return true;
Args[i] = 0;
} else {
ParmVarDecl *Param = Constructor->getParamDecl(i);

View File

@ -0,0 +1,16 @@
// RUN: clang-cc -emit-llvm-only %s
struct A {
A(const char *s){}
};
struct B {
A a;
B() : a("test") { }
};
void f() {
A a("test");
}