balazske added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker/CStringLength.h:43
+                                     ProgramStateRef &State, const Expr *Ex,
+                                     SVal Buf, bool Hypothetical = false);
+
----------------
I do not like that the //get// and //set// (CStringLength) functions are not 
symmetrical. I (and other developers) would think that the get function returns 
a stored value and the set function sets it. The `getCStringLength` is more a 
`computeCStringLength` and additionally may manipulate the `State` too. In this 
form it is usable mostly only for CStringChecker. (A separate function to get 
the value stored in the length map should exist instead of this `Hypothetical` 
thing.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84316/new/

https://reviews.llvm.org/D84316

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

Reply via email to