[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'. (WIP)

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 14 02:27:32 PST 2019


balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, mgorny.
Herald added a project: clang.

Currently work-in-progress.
This should check if the return values from certain C API functions
are checked for error. The list of functions is included.
A check for zero (or non-zero) error return value is used for every function.
The code is to be extended to work with other types of error conditions
and better bug report construction (at least indicate the place of the
function).

This check should implement SEI CERT C Coding Standard rule
"ERR33-C. Detect and handle standard library errors".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71510

Files:
  clang/docs/analyzer/checkers.rst
  clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
  clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
  clang/lib/StaticAnalyzer/Checkers/ErrorReturnChecker.cpp
  clang/test/Analysis/Inputs/system-header-simulator.h
  clang/test/Analysis/error-return.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71510.233926.patch
Type: text/x-patch
Size: 35507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191214/98be072e/attachment-0001.bin>


More information about the cfe-commits mailing list