danielmarjamaki added a comment.
Please click "Done" on fixed review comments.
================
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2038
+ // If the size can be nonzero, we have to check the other arguments.
+ if (StateNonZeroSize) {
+ State = StateNonZeroSize;
----------------
This "if (StateNonZeroSize)" condition is useless now since you added a early
return
================
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2039
+ if (StateNonZeroSize) {
+ State = StateNonZeroSize;
+
----------------
I suggest code cleanup:
```
State = StateNonZeroSize;
State = checkNonNull(C, State, Mem, MemVal);
```
Change that to:
```
State = checkNonNull(C, StateNonZeroSize, Mem, MemVal);
```
================
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2063
+ if (!State)
+ return;
+ }
----------------
indentation. I personally like the clang-format-diff script also. That would
cleanup all your changes.
cd llvm/tools/clang
svn diff | python tools/clang-format/clang-format-diff.py -i
It should work with git diff also but I have not tried that.
Repository:
rL LLVM
https://reviews.llvm.org/D31868
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits