[PATCH] D156274: [NFC] Avoid potential dereferencing of nullptr.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 26 11:34:18 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:1659
mangleCXXDtorType(Dtor_Complete);
+ assert(ND);
writeAbiTags(ND, AdditionalAbiTags);
----------------
efriedma wrote:
> aaron.ballman wrote:
> > This seems incorrect -- if the declaration name is a destructor, then `ND` should always be null, right?
> Seems okay to me? ND is the destructor declaration.
Yeah, you're correct -- I was thinking `CXXDestructorDecl` was not a `NamedDecl`, but it's a `CXXMethodDecl` without a name, so this is fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156274/new/
https://reviews.llvm.org/D156274
More information about the cfe-commits
mailing list