flovent wrote:
> The root cause is getAsCXXRecordDecl returns nullptr for dependent types,
> regardless of whether it is a target base class.
I think this is the thing fixed in this PR, we check `getAsCXXRecordDecl`'s
return value before using it.
From:
```
BasesToInit.erase(
Init->getBaseClass()->getAsCXXRecordDecl()->getCanonicalDecl());
```
To:
```
if (const CXXRecordDecl *CRD =
Init->getBaseClass()->getAsCXXRecordDecl())
BasesToInit.erase(CRD->getCanonicalDecl());
}
```
https://github.com/llvm/llvm-project/pull/192786
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits