[clang] [clang] Substitute alias templates from correct context (PR #74335)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 4 08:18:14 PST 2023
================
@@ -3990,9 +3990,14 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
if (Inst.isInvalid())
return QualType();
- CanonType = SubstType(Pattern->getUnderlyingType(),
- TemplateArgLists, AliasTemplate->getLocation(),
- AliasTemplate->getDeclName());
+ bool ForLambdaCallOperator = false;
+ if (const auto *Rec = dyn_cast<CXXRecordDecl>(Pattern->getDeclContext()))
+ ForLambdaCallOperator = Rec->isLambda();
+ Sema::ContextRAII SavedContext(*this, Pattern->getDeclContext(),
----------------
erichkeane wrote:
This is supposed to apply only to the SubstType, right? Probably want a set of braces around it.
https://github.com/llvm/llvm-project/pull/74335
More information about the cfe-commits
mailing list