[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 2 07:59:05 PST 2025


================
@@ -2525,8 +2525,11 @@ void TextNodeDumper::VisitCXXRecordDecl(const CXXRecordDecl *D) {
     OS << " instantiated_from";
     dumpPointer(Instance);
   }
-  if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D))
+  if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
     dumpTemplateSpecializationKind(CTSD->getSpecializationKind());
+    if (CTSD->hasMatchedPackOnParmToNonPackOnArg())
+      OS << " strict_match";
+  }
----------------
mizvekov wrote:

It's for testing and dumping. Well, the clang AST does in general tell us how things were formed. Implicit casts are one example, which shows in the ast-dump as well.

As a debugging aid, I'd expect the art-dump to represent the state of the object, even including states that are for caching reasons only (ie this flag can be (expensively) computed from the parameter list and the template argument list as written).

https://github.com/llvm/llvm-project/pull/125372


More information about the cfe-commits mailing list