for (CXXTemporaryObjectExpr::arg_iterator Arg = Node->arg_begin(),
ArgEnd = Node->arg_end();
Arg != ArgEnd; ++Arg) {
+ if (Arg->isDefaultArgument())
+ break;
if (Arg != Node->arg_begin())
OS << ", ";
PrintExpr(*Arg);
struct DefaultArgClass
{
DefaultArgClass(int a = 1) {}
+ DefaultArgClass(int a, int b, int c = 1) {}
};
struct NoArgClass
// CHECK: test12
// CHECK-NEXT: DefaultArgClass useDefaultArg;
// CHECK-NEXT: DefaultArgClass overrideDefaultArg(1);
+// CHECK-NEXT: DefaultArgClass(1, 2);
+// CHECK-NEXT: DefaultArgClass(1, 2, 3);
// CHECK-NEXT: NoArgClass noArg;
// CHECK-NEXT: ConstrWithCleanupsClass cwcNoArg;
// CHECK-NEXT: ConstrWithCleanupsClass cwcOverrideArg(48);
void test12() {
DefaultArgClass useDefaultArg;
DefaultArgClass overrideDefaultArg(1);
+ DefaultArgClass tempWithDefaultArg = DefaultArgClass(1, 2);
+ DefaultArgClass tempWithExplictArg = DefaultArgClass(1, 2, 3);
NoArgClass noArg;
ConstrWithCleanupsClass cwcNoArg;
ConstrWithCleanupsClass cwcOverrideArg(48);