[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 04:28:05 PDT 2024
================
@@ -1397,12 +1415,25 @@ namespace {
ArrayRef<UnexpandedParameterPack> Unexpanded,
bool &ShouldExpand, bool &RetainExpansion,
std::optional<unsigned> &NumExpansions) {
- return getSema().CheckParameterPacksForExpansion(EllipsisLoc,
- PatternRange, Unexpanded,
- TemplateArgs,
- ShouldExpand,
- RetainExpansion,
- NumExpansions);
+ if (ParameterInstantiationScope) {
+ for (UnexpandedParameterPack ParmPack : Unexpanded) {
+ NamedDecl *VD = ParmPack.first.dyn_cast<NamedDecl *>();
+ if (!VD)
+ continue;
+ if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(VD);
+ PVD &&
+ PVD->getDeclContext() ==
+ FunctionDCForParameterDeclInstantiation &&
+ !ParameterInstantiationScope->findInstantiationUnsafe(PVD)) {
+ // Fall through to the default lookup even if we have failed to
+ // instantiate anything. We're likely to crash thereafter.
+ instantiateParameterToScope(PVD, *ParameterInstantiationScope);
----------------
zyn0217 wrote:
We now fail on that
https://github.com/llvm/llvm-project/pull/102857
More information about the cfe-commits
mailing list