[PATCH] D66238: [clang-doc] Serialize inherited attributes and methods
Diego Astiazarán via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 19:09:48 PDT 2019
DiegoAstiazaran added inline comments.
================
Comment at: clang-tools-extra/clang-doc/Serialize.cpp:436
+ if (const CXXRecordDecl *Base =
+ cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition())) {
+ bool IsVirtual = false;
----------------
juliehockett wrote:
> Will `getDecl()` always return a non-null pointer? In the normal case I'd assume so, but the `cast_or_null` will only catch a null coming out of `getDefinition()` or the cast, not `getDecl`, so just want to check.
I got this logic from https://clang.llvm.org/doxygen/CXXInheritance_8cpp_source.html#l00150 so it should probably work as you said, `getDecl()` always returns a non-null pointer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66238/new/
https://reviews.llvm.org/D66238
More information about the cfe-commits
mailing list