Skip to content

Commit

Permalink
[Concepts] Add 'this' context to instantiation of member requires clause
Browse files Browse the repository at this point in the history
'this' context was missing in instantiation of member requires clause.
  • Loading branch information
saarraz committed Jan 30, 2020
1 parent a424ef9 commit 60f5da7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Expand Up @@ -2190,6 +2190,9 @@ Decl *TemplateDeclInstantiator::VisitCXXMethodDecl(
if (TrailingRequiresClause) {
EnterExpressionEvaluationContext ConstantEvaluated(
SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
auto *ThisContext = dyn_cast_or_null<CXXRecordDecl>(Owner);
Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext,
D->getMethodQualifiers(), ThisContext);
ExprResult SubstRC = SemaRef.SubstExpr(TrailingRequiresClause,
TemplateArgs);
if (SubstRC.isInvalid())
Expand Down

0 comments on commit 60f5da7

Please sign in to comment.