[clang] [clang] Cache normalized constraints by expression instead of by declaration (PR #226620)

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 23:00:04 PDT 2026


================
@@ -15186,6 +15186,11 @@ class Sema final : public SemaBase {
   /// here.
   llvm::DenseMap<ConstrainedDeclOrNestedRequirement, NormalizedConstraint *>
       NormalizationCache;
+  /// Caches the normal form of constraint expressions (and their pack
+  /// substitution index). These are shared by e.g. the members of all
+  /// specializations of a class template. Used to fill NormalizationCache.
+  llvm::DenseMap<std::pair<const Expr *, unsigned>, NormalizedConstraint *>
+      NormalizedConstraintExprCache;
----------------
nico wrote:

Ok, I updated this. The first commit is identical to the old commit, and the second commit removes the old cache. I updated the PR description to describe the composite change.

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


More information about the cfe-commits mailing list