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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits