[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 20:59:40 PST 2025


HighCommander4 wrote:

Context: I was confused by the comment above `DependentNameType::getIdentifier()`, which suggested the function only sometimes returns non-null, but I couldn't find any case where it would.

It turns out the comment dates back to a time when the type stored a `PointerUnion<const IdentifierInfo *, const TemplateSpecializationType *>`, and only returned non-null if an `IdentifierInfo *` was stored. That was changed in https://github.com/llvm/llvm-project/commit/c392f37ae81d99a29c95dafb964e52492f2e0f37.

https://github.com/llvm/llvm-project/pull/122418


More information about the cfe-commits mailing list