Skip to content

Commit 19ad0c5

Browse files
authored
Merge pull request #66616 from xedin/print-overloaded-ref-expr-choices-for-non-operators
[AST] ASTDumper: Print overload choices of non-operator `OverloadedDe…
2 parents 612a2e7 + bf5612c commit 19ad0c5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,17 @@ class PrintExpr : public ExprVisitor<PrintExpr> {
21282128
PrintWithColorRAII(OS, ExprModifierColor)
21292129
<< " number_of_decls=" << E->getDecls().size()
21302130
<< " function_ref=" << getFunctionRefKindStr(E->getFunctionRefKind());
2131+
if (!E->isForOperator()) {
2132+
PrintWithColorRAII(OS, ExprModifierColor) << " decls=[\n";
2133+
interleave(
2134+
E->getDecls(),
2135+
[&](ValueDecl *D) {
2136+
OS.indent(Indent + 2);
2137+
D->dumpRef(PrintWithColorRAII(OS, DeclModifierColor).getOS());
2138+
},
2139+
[&] { PrintWithColorRAII(OS, DeclModifierColor) << ",\n"; });
2140+
PrintWithColorRAII(OS, ExprModifierColor) << "]";
2141+
}
21312142
PrintWithColorRAII(OS, ParenthesisColor) << ')';
21322143
}
21332144
void visitUnresolvedDeclRefExpr(UnresolvedDeclRefExpr *E) {

0 commit comments

Comments
 (0)