Add back the workaround since it lead to constructor conversion bugs :(
llvm-svn: 81917
This commit is contained in:
parent
45068b3e29
commit
c8bfc466f3
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue