[all-commits] [llvm/llvm-project] bda3dd: [analyzer][NFC] Change LangOptions to CheckerManag...

Kristóf Umann via All-commits all-commits at lists.llvm.org
Fri Mar 27 06:34:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bda3dd0d986b33c3a327c0ee0eb8ba43aa140699
      https://github.com/llvm/llvm-project/commit/bda3dd0d986b33c3a327c0ee0eb8ba43aa140699
  Author: Kirstóf Umann <dkszelethus at gmail.com>
  Date:   2020-03-27 (Fri, 27 Mar 2020)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
    M clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h
    M clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
    M clang/lib/Analysis/plugins/CheckerOptionHandling/CheckerOptionHandling.cpp
    M clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
    M clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
    M clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CXXSelfAssignmentChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
    M clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
    M clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp
    M clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
    M clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
    M clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
    M clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
    M clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
    M clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/InvalidatedIteratorChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/IteratorRangeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MismatchedIteratorChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/PointerIterationChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/STLAlgorithmModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/cert/PutenvWithAutoChecker.cpp
    M clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
    M clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp

  Log Message:
  -----------
  [analyzer][NFC] Change LangOptions to CheckerManager in the shouldRegister* functions

Some checkers may not only depend on language options but also analyzer options.
To make this possible this patch changes the parameter of the shouldRegister*
function to CheckerManager to be able to query the analyzer options when
deciding whether the checker should be registered.

Differential Revision: https://reviews.llvm.org/D75271




More information about the All-commits mailing list