================
@@ -3053,24 +3098,38 @@ void OMPTraitInfo::getAsVariantMatchInfo(ASTContext 
&ASTCtx,
                    TraitProperty::user_condition_unknown &&
                "Ill-formed user condition, expected unknown trait property!");
 
+        // Identify the condition by its original expression; substitution may
+        // fold different template parameters to the same value.
+        assert(Selector.OriginalCondition && "missing original condition");
+        const Expr *Condition =
+            Selector.OriginalCondition->IgnoreParenImpCasts();
+        llvm::FoldingSetNodeID ID;
+        Condition->Profile(ID, ASTCtx, /*Canonical=*/true);
+        ParameterOwnerProfiler(ID).TraverseStmt(Condition);
----------------
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

Reply via email to