VisitFunctionType(T);
for (QualType PT : T->getParamTypes())
dumpTypeAsChild(PT);
- if (T->getExtProtoInfo().Variadic)
- dumpChild([=] { OS << "..."; });
}
void VisitTypeOfExprType(const TypeOfExprType *T) {
dumpStmt(T->getUnderlyingExpr());
NodeDumper.dumpName(D);
NodeDumper.dumpType(D->getReturnType());
+ if (D->isVariadic())
+ OS << " variadic";
+
if (D->isThisDeclarationADefinition()) {
dumpDeclContext(D);
} else {
dumpDecl(Parameter);
}
- if (D->isVariadic())
- dumpChild([=] { OS << "..."; });
-
if (D->hasBody())
dumpStmt(D->getBody());
}
}
void ASTDumper::VisitBlockDecl(const BlockDecl *D) {
+ if (D->isVariadic())
+ OS << " variadic";
+
for (auto I : D->parameters())
dumpDecl(I);
- if (D->isVariadic())
- dumpChild([=]{ OS << "..."; });
-
if (D->capturesCXXThis())
dumpChild([=]{ OS << "capture this"; });
@interface testObjCMethodDecl : A {
}
- (int) TestObjCMethodDecl: (int)i, ...;
-// CHECK: ObjCMethodDecl{{.*}} - TestObjCMethodDecl: 'int'
+// CHECK: ObjCMethodDecl{{.*}} - TestObjCMethodDecl: 'int' variadic
// CHECK-NEXT: ParmVarDecl{{.*}} i 'int'
-// CHECK-NEXT: ...
@end
@implementation testObjCMethodDecl
- (int) TestObjCMethodDecl: (int)i, ... {
return 0;
}
-// CHECK: ObjCMethodDecl{{.*}} - TestObjCMethodDecl: 'int'
+// CHECK: ObjCMethodDecl{{.*}} - TestObjCMethodDecl: 'int' variadic
// CHECK-NEXT: ImplicitParamDecl{{.*}} self
// CHECK-NEXT: ImplicitParamDecl{{.*}} _cmd
// CHECK-NEXT: ParmVarDecl{{.*}} i 'int'
-// CHECK-NEXT: ...
// CHECK-NEXT: CompoundStmt
@end
^(int y, ...){ x; };
}
// CHECK: FunctionDecl{{.*}}TestBlockDecl
-// CHECK: BlockDecl
+// CHECK: BlockDecl {{.+}} <col:3, col:21> col:3 variadic
// CHECK-NEXT: ParmVarDecl{{.*}} y 'int'
-// CHECK-NEXT: ...
// CHECK-NEXT: capture ParmVar{{.*}} 'x' 'int'
// CHECK-NEXT: CompoundStmt