[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 05:40:20 PST 2016


NoQ added a comment.

This looks good to me (bikeshedded a bit), but i think Devin should have another look, because his comments were way deeper than mine.



================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:217
+
+  llvm::ImmutableList<const CXXBaseSpecifier *> consCXXBase(
+      const CXXBaseSpecifier *CBS,
----------------
Hmm, is it "construct"? Or "constrain"? I think a verbose name wouldn't hurt.
In fact, i suspect that `consVals` are rather `conSVals`, where `con` stands for "concatenate".


================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:882
+        return UndefinedVal();
+      if (const FieldDecl *FD = PTMSV->getDeclAs<FieldDecl>())
+        return state->getLValue(FD, lhs);
----------------
Hmm, do we need to cover `CXXMethodDecl` here? Or is it modeled as a function pointer anyway, so no action is needed? Worth commenting, i think.


https://reviews.llvm.org/D25475





More information about the cfe-commits mailing list