llvm-project
37b4df43 - [Clang] Remove the wrong assumption when rebuilding SizeOfPackExprs for constraint normalization (#115120)

Commit
1 year ago
[Clang] Remove the wrong assumption when rebuilding SizeOfPackExprs for constraint normalization (#115120) In 463a4f150, we assumed that all the template argument packs are of size 1 when normalizing a constraint expression because I mistakenly thought those packs were obtained from their injected template parameters. This was wrong because we might be checking constraints when instantiating a friend declaration within a class template specialization, where the parent class template is specialized with non-dependent template arguments. In that sense, we shouldn't assume any pack size nor expand anything in such a scenario. Moreover, there are no intermediate (substituted but unexpanded) AST nodes for template template parameters, so we have to special-case their transformations by looking into the instantiation scope instead of extracting anything from template arguments. Fixes #115098
Author
Parents
Loading