================
@@ -911,6 +911,34 @@ bool Sema::CheckParameterPacksForExpansion(
// Determine the size of this argument pack.
unsigned NewPackSize, PendingPackExpansionSize = 0;
if (IsVarDeclPack) {
+
+ // if there is a function paramter pack and we directly call
findInstantiationOf
+ // then it fails because localdecls are not added to the instantiation
scope until
+ // after we check for pack expansions. So we need to check for parameter
packs here
+ // and add them to the instantiation scope before we call
findInstantiationOf.
----------------
albertbolt1 wrote:
```mermaid
flowchart TD
A[EvaluateSlow<br/>FoldExpandedConstraint] -->
B[EvaluateFoldExpandedConstraintSize]
B --> C[CheckParameterPacksForExpansion]
C --> D{findInstantiationOf<br/>on booleans pack}
D -->|Fails - not in scope| E[Returns nullptr]
E --> F[ShouldExpand = false]
F --> G[FAILURE<br/>Cannot determine pack size]
```
https://github.com/llvm/llvm-project/pull/198207
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits