[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 25 04:50:21 PST 2025
hokein wrote:
> (We should have been doing this wrong prior to 20, but it didn't crash because it called Decl::getTemplateDepth(), which returns 0 for the transformed template parameter declaration)
I think you're right. The depth is already incorrect in clang19 etc. https://godbolt.org/z/d9xhxh3EM
```
|-TemplateTypeParmDecl 0x175b5b88 <line:6:13, col:22> col:22 typename depth 32767 index 1 T
```
https://github.com/llvm/llvm-project/pull/128704
More information about the cfe-commits
mailing list