================
@@ -3039,6 +3043,47 @@ void
OMPClausePrinter::VisitOMPXBareClause(OMPXBareClause *Node) {
OS << "ompx_bare";
}
+namespace {
+/// Canonical profiles identify template and function parameters only by
+/// position; add the declaration that owns each referenced parameter.
+class ParameterOwnerProfiler final : public ConstDynamicRecursiveASTVisitor {
+ llvm::FoldingSetNodeID &ID;
+
+ void addOwner(const Decl *D) {
+ if (isa_and_nonnull<ParmVarDecl, NonTypeTemplateParmDecl,
+ TemplateTypeParmDecl, TemplateTemplateParmDecl>(D))
+ ID.AddPointer(cast<Decl>(D->getDeclContext())->getCanonicalDecl());
----------------
MattPD wrote:
`ParameterOwnerProfiler` is removed from this PR, so this case can move to the
condition-identity follow-up.
https://github.com/llvm/llvm-project/pull/231668
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits