[PATCH] D55429: [analyzer] Add CheckerManager::getChecker that asserts on non-registered checkers, assert on registering already registered checkers

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 7 05:44:38 PST 2018


Szelethus created this revision.
Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC, baloghadamsoftware.
Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, whisperity.

Title says it all, this is pretty important. While this doesn't immediately make it impossible to register multiple checkers in a registry function, it does make it completely avoidable.


Repository:
  rC Clang

https://reviews.llvm.org/D55429

Files:
  include/clang/StaticAnalyzer/Core/CheckerManager.h
  lib/StaticAnalyzer/Checkers/CStringChecker.cpp
  lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
  lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
  lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
  lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
  lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
  lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
  lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
  lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
  lib/StaticAnalyzer/Checkers/ValistChecker.cpp
  lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
  test/Analysis/analyzer-checker-config.c
  test/Analysis/free.c
  test/Analysis/outofbound.c
  test/Analysis/undef-buffers.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55429.177192.patch
Type: text/x-patch
Size: 16416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181207/e2448d68/attachment-0001.bin>


More information about the cfe-commits mailing list