1717#include " clang/AST/Decl.h"
1818#include " clang/AST/DeclCXX.h"
1919#include " clang/AST/DeclTemplate.h"
20- #include " clang/AST/DependenceFlags.h"
2120#include " clang/AST/Expr.h"
2221#include " clang/AST/ExprConcepts.h"
2322#include " clang/AST/RecursiveASTVisitor.h"
3231#include " clang/Sema/SemaInternal.h"
3332#include " clang/Sema/Template.h"
3433#include " clang/Sema/TemplateDeduction.h"
35- #include " llvm/ADT/ArrayRef.h"
3634#include " llvm/ADT/DenseMap.h"
3735#include " llvm/ADT/PointerUnion.h"
38- #include " llvm/ADT/STLExtras.h"
39- #include " llvm/ADT/ScopeExit.h"
40- #include " llvm/ADT/SmallVector.h"
4136#include " llvm/ADT/StringExtras.h"
42- #include " llvm/Support/Casting.h"
4337#include " llvm/Support/SaveAndRestore.h"
44- #include " llvm/Support/raw_ostream.h"
45- #include < chrono>
46- #include < cstddef>
47- #include < iterator>
48- #include < optional>
4938
5039using namespace clang ;
5140using namespace sema ;
@@ -691,9 +680,7 @@ ExprResult CalculateConstraintSatisfaction::Calculate(
691680 Constraint.getPackSubstitutionIndex ()
692681 ? Constraint.getPackSubstitutionIndex ()
693682 : PackSubstitutionIndex;
694- // Constraint.getConstraintExpr()->Profile(ID, S.Context, /*Canonical=*/true,
695- // /*ProfileLambdaExpr=*/true);
696- auto *Previous = Constraint.getConstraintExpr ();
683+
697684 ID.AddPointer (Constraint.getConstraintExpr ());
698685 ID.AddInteger (OuterPackSubstIndex.toInternalRepresentation ());
699686 ID.AddBoolean (Constraint.hasParameterMapping ());
@@ -713,15 +700,12 @@ ExprResult CalculateConstraintSatisfaction::Calculate(
713700
714701 ExprResult E = CalculateSlow (Constraint, MLTAL);
715702
716- assert (Constraint.getConstraintExpr () == Previous);
717-
718703 CachedConceptIdConstraint Cache;
719704 Cache.Satisfaction .ContainsErrors = Satisfaction.ContainsErrors ;
720705 Cache.Satisfaction .IsSatisfied = Satisfaction.IsSatisfied ;
721706 std::copy (Satisfaction.Details .begin () + Size, Satisfaction.Details .end (),
722707 std::back_inserter (Cache.Satisfaction .Details ));
723708 Cache.SubstExpr = E;
724- Cache.E = Constraint.getConstraintExpr ();
725709 S.ConceptIdSatisfactionCache .insert ({ID, std::move (Cache)});
726710
727711 return E;
@@ -2153,8 +2137,6 @@ NormalizedConstraint *NormalizedConstraint::fromConstraintExpr(
21532137 if (!SubNF)
21542138 return nullptr ;
21552139 }
2156- // if (substituteParameterMappings(S, *SubNF, CSE))
2157- // return nullptr;
21582140
21592141 return ConceptIdConstraint::Create (S.getASTContext (),
21602142 CSE->getConceptReference (), SubNF, D,
0 commit comments