[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 01:46:11 PDT 2019


Charusso added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:44
+
+bool isDerivedFrom(QualType X, QualType Y) {
+  const CXXRecordDecl *XRD = X->getPointeeCXXRecordDecl();
----------------
Szelethus wrote:
> Hmm, I think this function answers the question, at least in the standard library sense, whether Y `std::is_base_of` of X, whereas "is derived from?" is another term that is used by clang and seems to not allow equality of types. Should we rename this to `isBaseOf`?
I have left the equality by a mistake. It is wanted to be a wrapper of `isDerivedFrom()`, which does not allow equality. Thanks for the notice!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67079/new/

https://reviews.llvm.org/D67079





More information about the cfe-commits mailing list