Skip to content

Commit 6f462d8

Browse files
authored
Merge pull request #46 from zyn0217/fix-access-checking-after-normalization
Fix the access checking after normalization
2 parents 0b7a92a + 8cbad8d commit 6f462d8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/lib/Sema/SemaConcept.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,10 @@ static bool calculateConstraintSatisfaction(
563563
ConstraintSatisfaction &Satisfaction,
564564
UnsignedOrNone PackSubstitutionIndex) {
565565

566+
Sema::ContextRAII CurContext(
567+
S, Constraint.getConceptId()->getNamedConcept()->getDeclContext(),
568+
/*NewThisContext=*/false);
569+
566570
llvm::SmallVector<TemplateArgument> SubstitutedOuterMost;
567571
std::optional<MultiLevelTemplateArgumentList> SubstitutedArgs =
568572
SubstitutionInTemplateArguments(S, Constraint, Template, MLTAL,

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4756,9 +4756,6 @@ ExprResult Sema::CheckConceptTemplateId(
47564756
EnterExpressionEvaluationContext EECtx{
47574757
*this, ExpressionEvaluationContext::Unevaluated, CSD};
47584758

4759-
ContextRAII CurContext(*this, CSD->getDeclContext(),
4760-
/*NewThisContext=*/false);
4761-
47624759
Error = CheckConstraintSatisfaction(
47634760
NamedConcept, AssociatedConstraint(NamedConcept->getConstraintExpr()),
47644761
MLTAL,

0 commit comments

Comments
 (0)