Corentin Jabot
3784e8ccfb
[Clang] Fix Unevaluated Lambdas
...
Unlike other types, when lambdas are instanciated,
they are recreated from scratch.
When an unevaluated lambdas appear in the type of a function,
parameter it is instanciated in the wrong declaration context,
as parameters are transformed before the function.
To support lambda in function parameters, we try to
compute whether they are dependant without looking at the
declaration context.
This is a short term stopgap solution to avoid clang
iceing. A better fix might be to inject some kind of
transparent declaration with correctly computed dependency
for function parameters, variable templates, etc.
Fixes https://github.com/llvm/llvm-project/issues/50376
Fixes https://github.com/llvm/llvm-project/issues/51414
Fixes https://github.com/llvm/llvm-project/issues/51416
Fixes https://github.com/llvm/llvm-project/issues/51641
Fixes https://github.com/llvm/llvm-project/issues/54296
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D121532
2022-03-25 19:16:45 +01:00