dcoughlin added a comment.

Thanks for the patch!

How does this differ from `getCXXThisVal()` on `CXXInstanceCall` and its 
subclasses in CallEvent.h? Can that be used instead? Or are there places where 
you need access to this without a CallEvent?

Also: it seems like there are a lot of places in the analyzer codebase that do 
this dance (get the 'this' pointer, load from it). Can they be safely replaced 
with calls to this helper? If so, that would be awesome.



================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:769
+      return None;
+    Loc ThisLoc = getStateManager().getSValBuilder().getCXXThis(RD, SFC);
+    return getSVal(ThisLoc);
----------------
Why this overload of getCXXThis() and not the one taking a CXXMethodDecl?


https://reviews.llvm.org/D26762



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to