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

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 11:25:20 PDT 2019


Szelethus added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:44
+
+bool isDerivedFrom(QualType X, QualType Y) {
+  const CXXRecordDecl *XRD = X->getPointeeCXXRecordDecl();
----------------
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`?


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

https://reviews.llvm.org/D67079





More information about the cfe-commits mailing list