[PATCH] D70411: [analyzer] CERT: StrChecker: 31.c

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 22 11:57:33 PST 2019


Charusso updated this revision to Diff 230702.
Charusso marked an inline comment as done.
Charusso retitled this revision from "[analyzer][WIP] CERT: StrChecker: 31.c" to "[analyzer] CERT: StrChecker: 31.c".
Charusso added a comment.

- Remove the report storing map so we do not traverse backwards on the bug-path.
- Use `NoteTags` instead of reports on problematic function calls.
- Emit a report only if a not null-terminated string is read.
- Store whether the string is null-terminated.


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

https://reviews.llvm.org/D70411

Files:
  clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
  clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicSizeInfo.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
  clang/lib/StaticAnalyzer/Checkers/AllocationState.h
  clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
  clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  clang/lib/StaticAnalyzer/Checkers/cert/StrChecker.cpp
  clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
  clang/test/Analysis/Inputs/system-header-simulator.h
  clang/test/Analysis/cert/str31-c-fp-suppression.cpp
  clang/test/Analysis/cert/str31-c-notes.cpp
  clang/test/Analysis/cert/str31-c.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70411.230702.patch
Type: text/x-patch
Size: 32477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191122/d11d90b9/attachment-0001.bin>


More information about the cfe-commits mailing list