================ @@ -589,6 +589,24 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> { return true; } + bool TraversePseudoObjectExpr(PseudoObjectExpr *E) { + // Do not show inlay hints for the __builtin_dump_struct, which would + // expand to a PseudoObjectExpr that includes a couple of calls to a + // printf function. Printing parameter names for that anyway would end up + // with duplicate parameter names (which, however, got de-duplicated after + // visiting) for the printf function. + if (auto *CE = dyn_cast<CallExpr>(E->getSyntacticForm()); + CE && CE->getBuiltinCallee() == Builtin::BI__builtin_dump_struct) + // Only traverse the syntactic forms. This leaves the door open in case + // the arguments in the syntactic form for __builtin_dump_struct could + // possibly get parameter names. + return RecursiveASTVisitor<InlayHintVisitor>::TraverseStmt( + E->getSyntacticForm()); + // FIXME: Shall we ignore semantic forms for other pseudo object ---------------- zyn0217 wrote:
Oops. sorry for messing up the types. :-( https://github.com/llvm/llvm-project/pull/71366 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits