When dumping the AST to JSON, dump the argument name to a sizeof pack expression.

llvm-svn: 361766
This commit is contained in:
Aaron Ballman 2019-05-27 14:17:32 +00:00
parent 11e0549145
commit bcc0cedf77
3 changed files with 7 additions and 1 deletions

View File

@ -244,6 +244,7 @@ public:
void VisitImplicitCastExpr(const ImplicitCastExpr *ICE);
void VisitCallExpr(const CallExpr *CE);
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *TTE);
void VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE);
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *ULE);
void VisitAddrLabelExpr(const AddrLabelExpr *ALE);

View File

@ -894,6 +894,10 @@ void JSONNodeDumper::VisitUnaryExprOrTypeTraitExpr(
JOS.attribute("argType", createQualType(TTE->getArgumentType()));
}
void JSONNodeDumper::VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE) {
VisitNamedDecl(SOPE->getPack());
}
void JSONNodeDumper::VisitUnresolvedLookupExpr(
const UnresolvedLookupExpr *ULE) {
JOS.attribute("usesADL", ULE->requiresADL());

View File

@ -1505,7 +1505,8 @@ void TestNonADLCall3() {
// CHECK-NEXT: "type": {
// CHECK-NEXT: "qualType": "unsigned long"
// CHECK-NEXT: },
// CHECK-NEXT: "valueCategory": "rvalue"
// CHECK-NEXT: "valueCategory": "rvalue",
// CHECK-NEXT: "name": "Ts"
// CHECK-NEXT: },
// CHECK-NEXT: {
// CHECK-NEXT: "id": "0x{{.*}}",