[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

Balogh, Ádám via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 24 11:04:24 PST 2016

baloghadamsoftware added inline comments.

Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:204
+                                          CheckerContext &C) const {
+  const auto *ThisExpr = COCE->getArg(0);
baloghadamsoftware wrote:
> NoQ wrote:
> > This code definitely deserves comments. I managed to understand that this is a workaround for completely replacing the conjured symbol with a lazy value upon calling a method over temporary, which the core does from time to time, and i suspect that this code may break whenever more than one checker starts doing this (i.e. you'd have to skip more than one predecessor node in this case).
> > 
> > I still think that the root cause here is conjured structural symbols which i'd probably prefer to get rid of completely, and then this hack wouldn't be necessary.
> I think I do not fully understand you here: do you mean some fix in the core?
I am not sure why I am handleing CXXOperatorCall here. Instead, I should handle every call, but only instance calls. For final solution would it not be better to make the checker explicitely metrialize a temporary object here instead of just creating it silently? Then my existing checker function would catch it.


More information about the cfe-commits mailing list