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

Kirill Romanenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 06:45:16 PST 2016


kromanenkov marked an inline comment as done.
kromanenkov added inline comments.


================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:217
+
+  llvm::ImmutableList<const CXXBaseSpecifier *> consCXXBase(
+      const CXXBaseSpecifier *CBS,
----------------
NoQ wrote:
> 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".
In fact I thought that this entails "consume" :)


================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:882
+        return UndefinedVal();
+      if (const FieldDecl *FD = PTMSV->getDeclAs<FieldDecl>())
+        return state->getLValue(FD, lhs);
----------------
NoQ wrote:
> 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.
AFAIU CXXMethodDecl is processed in SVal::getAsFunctionDecl() so i'm for no action.


https://reviews.llvm.org/D25475





More information about the cfe-commits mailing list