[clang] Fix #99858 (PR #99859)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 26 00:18:59 PDT 2024
mizvekov wrote:
My impression is that in this case, the Decl is supposed to be instantiated here, so in valid code, a instantiation would be found, so strictly speaking the null check would not be the right thing.
But we do have cases where we don't instantiate in case the Decl is invalid.
In that case, the right thing to do would be to guard on an `!isInvalidDecl()` check.
Can you double check you are seeing an Invalid declaration here?
For example,
```
assert(!ParmPack.first.get<NamedDecl *>()->isInvalidDecl());
```
https://github.com/llvm/llvm-project/pull/99859
More information about the cfe-commits
mailing list