NoQ added inline comments.
Herald added subscribers: a.sidorin, rnkovacs, szepet.


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1489-1511
+SymbolRef replaceSymbol(SymbolManager &SymMgr, SymbolRef OrigExpr,
+                        SymbolRef OldExpr, SymbolRef NewSym) {
+  // We have a symbolic expression in the format of A+n, where we want to
+  // replace A+m with B, so the result becomes B+k, where k==n-m.
+  SymbolRef OrigSym, OldSym;
+  llvm::APSInt OrigInt, OldInt;
+  std::tie(OrigSym, OrigInt) = decompose(OrigExpr);
----------------
I do not immediately understand what is this useful for. At least tests don't 
look like they make use of these offset manipulations(?)

Without full understanding, i wonder: when we overwrite one container with 
another, why don't we just overwrite //all// symbols associated with it, 
instead of creating a mixture of old and new symbols?

Or maybe this is an accidental part of another patch, that has something to do 
with resizes?


https://reviews.llvm.org/D32859



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

Reply via email to