================ @@ -1305,9 +1305,13 @@ void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { Qualifier->print(OS, Policy); if (Node->hasTemplateKeyword()) OS << "template "; + + bool ForceAnonymous = + Policy.PrintAsCanonical && VD->getKind() == Decl::NonTypeTemplateParm; ---------------- mizvekov wrote:
Yeah, canonicalization of expressions should erase the identity of any NTTPs referenced therein, which should make them print as 'value-parameter-X-X', as if the NTTP was anonymous, and similarly to how it happens with regards to types and type template parameters. https://github.com/llvm/llvm-project/pull/135133 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits