diff options
author | Krystian Stasiowski <sdkrystian@gmail.com> | 2024-10-16 08:40:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-16 10:40:03 -0400 |
commit | 9381c6fd04cc16a7606633f57c96c11e58181ddb (patch) | |
tree | 5ba7847cfa9730df01a597ac7188c08646deb294 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 95c24cb9de54f81b07ee4abd594fc32905063c68 (diff) | |
download | llvm-9381c6fd04cc16a7606633f57c96c11e58181ddb.zip llvm-9381c6fd04cc16a7606633f57c96c11e58181ddb.tar.gz llvm-9381c6fd04cc16a7606633f57c96c11e58181ddb.tar.bz2 |
[Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (#112381)
After #111852 refactored multi-level template argument list collection,
the following results in a crash:
```
template<typename T, bool B>
struct A;
template<bool B>
struct A<int, B>
{
void f() requires B;
};
template<bool B>
void A<int, B>::f() requires B { } // crash here
```
This happens because when collecting template arguments for constraint
normalization from a partial specialization, we incorrectly use the
template argument list of the partial specialization. We should be using
the template argument list of the _template-head_ (as defined in
[temp.arg.general] p2). Fixes #112222.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions