[PATCH] D32350: [Analyzer] Exception Checker

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 07:02:35 PDT 2017


baloghadamsoftware created this revision.
Herald added a subscriber: mgorny.

This is an old checker used only internally until now. The original author is Bence Babati, I added him as a subscriber.

The checker checks whather exceptions escape the main() function, destructors. functions with exception specifications not containing the exception or functions specially marked by an option.

I did not change the name of the checker, but maybe ExceptionEscape or UncaughtException would be more suitable.

I am not sure whether Clang Static Analyzer is the right place for this checker since it only walks the AST. Maybe it should be reimplemented Clang-Tidy, but there we would need a new matcher that walks the call chain recursively. (As far as I know, we cannot write iterative matcher expressions.)


https://reviews.llvm.org/D32350

Files:
  include/clang/StaticAnalyzer/Checkers/Checkers.td
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/ExceptionMisuseChecker.cpp
  test/Analysis/exception-misuse.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32350.96134.patch
Type: text/x-patch
Size: 23656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170421/543b488c/attachment-0001.bin>


More information about the cfe-commits mailing list