baloghadamsoftware requested changes to this revision.
baloghadamsoftware added inline comments.
This revision now requires changes to proceed.
Herald added a subscriber: rnkovacs.


================
Comment at: clang/docs/analyzer/checkers.rst:1973
+``strpbrk()``, ``strchr()``, ``strrchr()``, ``strstr()``, ``memchr()``.
+
 .. _alpha-security-cert-str-31c:
----------------
**STR30-C** is more general: //Do not attempt to modify string literals//. You 
should not check for these functions specifically, just model that they return 
string literals. However, you can also declare a string literal yourself. The 
checker should look for modifications of //any// string literals, whether 
returned by these functions or not.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/cert/StrChecker.cpp:394
+/// Check whether a constant string is being modified. If so, emit a report.
+static bool isConstantStringModify(SVal L, SVal V, const Stmt *S,
+                                   CheckerContext &C, const BugType &BT) {
----------------
I do not see `V` used in this function anywhere. We are not interested to 
//what// it is attempted to be modified. We are just interested that it is 
attempted to be modified.


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

https://reviews.llvm.org/D71155



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

Reply via email to