]> granicus.if.org Git - clang/commit
Split libAnalysis into two libraries: libAnalysis and libChecker.
authorTed Kremenek <kremenek@apple.com>
Mon, 25 Jan 2010 04:41:41 +0000 (04:41 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 25 Jan 2010 04:41:41 +0000 (04:41 +0000)
commit1309f9a3b225ea846e5822691c39a77423125505
tree1ba6d1976da4f426292619af026dbf9d9314c573
parent3db9eb1fbe5771d3d64db01af46b4eee9aca8ed0
Split libAnalysis into two libraries: libAnalysis and libChecker.

(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
    path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker.  More changes pending.  :)

This change also exposed a layering violation between AnalysisContext
and MemRegion.  BlockInvocationContext shouldn't explicitly know about
BlockDataRegions.  For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet).  We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
110 files changed:
include/clang/Analysis/Analyses/UninitializedValues.h
include/clang/Analysis/PathSensitive/AnalysisContext.h [deleted file]
include/clang/Checker/LocalCheckers.h [moved from include/clang/Analysis/LocalCheckers.h with 93% similarity]
include/clang/Checker/ManagerRegistry.h [moved from include/clang/Analysis/ManagerRegistry.h with 97% similarity]
include/clang/Checker/PathDiagnostic.h [moved from include/clang/Analysis/PathDiagnostic.h with 100% similarity]
include/clang/Checker/PathSensitive/AnalysisManager.h [moved from include/clang/Analysis/PathSensitive/AnalysisManager.h with 96% similarity]
include/clang/Checker/PathSensitive/BasicValueFactory.h [moved from include/clang/Analysis/PathSensitive/BasicValueFactory.h with 98% similarity]
include/clang/Checker/PathSensitive/BugReporter.h [moved from include/clang/Analysis/PathSensitive/BugReporter.h with 98% similarity]
include/clang/Checker/PathSensitive/BugType.h [moved from include/clang/Analysis/PathSensitive/BugType.h with 97% similarity]
include/clang/Checker/PathSensitive/Checker.h [moved from include/clang/Analysis/PathSensitive/Checker.h with 98% similarity]
include/clang/Checker/PathSensitive/CheckerVisitor.def [moved from include/clang/Analysis/PathSensitive/CheckerVisitor.def with 100% similarity]
include/clang/Checker/PathSensitive/CheckerVisitor.h [moved from include/clang/Analysis/PathSensitive/CheckerVisitor.h with 91% similarity]
include/clang/Checker/PathSensitive/Checkers/DereferenceChecker.h [moved from include/clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h with 100% similarity]
include/clang/Checker/PathSensitive/ConstraintManager.h [moved from include/clang/Analysis/PathSensitive/ConstraintManager.h with 98% similarity]
include/clang/Checker/PathSensitive/Environment.h [moved from include/clang/Analysis/PathSensitive/Environment.h with 96% similarity]
include/clang/Checker/PathSensitive/ExplodedGraph.h [moved from include/clang/Analysis/PathSensitive/ExplodedGraph.h with 99% similarity]
include/clang/Checker/PathSensitive/GRAuditor.h [moved from include/clang/Analysis/PathSensitive/GRAuditor.h with 100% similarity]
include/clang/Checker/PathSensitive/GRBlockCounter.h [moved from include/clang/Analysis/PathSensitive/GRBlockCounter.h with 100% similarity]
include/clang/Checker/PathSensitive/GRCoreEngine.h [moved from include/clang/Analysis/PathSensitive/GRCoreEngine.h with 97% similarity]
include/clang/Checker/PathSensitive/GRExprEngine.h [moved from include/clang/Analysis/PathSensitive/GRExprEngine.h with 97% similarity]
include/clang/Checker/PathSensitive/GRExprEngineBuilders.h [moved from include/clang/Analysis/PathSensitive/GRExprEngineBuilders.h with 97% similarity]
include/clang/Checker/PathSensitive/GRSimpleAPICheck.h [moved from include/clang/Analysis/PathSensitive/GRSimpleAPICheck.h with 90% similarity]
include/clang/Checker/PathSensitive/GRState.h [moved from include/clang/Analysis/PathSensitive/GRState.h with 98% similarity]
include/clang/Checker/PathSensitive/GRStateTrait.h [moved from include/clang/Analysis/PathSensitive/GRStateTrait.h with 100% similarity]
include/clang/Checker/PathSensitive/GRSubEngine.h [moved from include/clang/Analysis/PathSensitive/GRSubEngine.h with 98% similarity]
include/clang/Checker/PathSensitive/GRTransferFuncs.h [moved from include/clang/Analysis/PathSensitive/GRTransferFuncs.h with 94% similarity]
include/clang/Checker/PathSensitive/GRWorkList.h [moved from include/clang/Analysis/PathSensitive/GRWorkList.h with 97% similarity]
include/clang/Checker/PathSensitive/MemRegion.h [moved from include/clang/Analysis/PathSensitive/MemRegion.h with 99% similarity]
include/clang/Checker/PathSensitive/SVals.h [moved from include/clang/Analysis/PathSensitive/SVals.h with 99% similarity]
include/clang/Checker/PathSensitive/SValuator.h [moved from include/clang/Analysis/PathSensitive/SValuator.h with 98% similarity]
include/clang/Checker/PathSensitive/Store.h [moved from include/clang/Analysis/PathSensitive/Store.h with 98% similarity]
include/clang/Checker/PathSensitive/SymbolManager.h [moved from include/clang/Analysis/PathSensitive/SymbolManager.h with 100% similarity]
include/clang/Checker/PathSensitive/ValueManager.h [moved from include/clang/Analysis/PathSensitive/ValueManager.h with 96% similarity]
lib/Analysis/AnalysisContext.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/LiveVariables.cpp
lib/Analysis/UninitializedValues.cpp
lib/CMakeLists.txt
lib/Checker/ArrayBoundChecker.cpp [moved from lib/Analysis/ArrayBoundChecker.cpp with 94% similarity]
lib/Checker/AttrNonNullChecker.cpp [moved from lib/Analysis/AttrNonNullChecker.cpp with 96% similarity]
lib/Checker/BasicConstraintManager.cpp [moved from lib/Analysis/BasicConstraintManager.cpp with 98% similarity]
lib/Checker/BasicObjCFoundationChecks.cpp [moved from lib/Analysis/BasicObjCFoundationChecks.cpp with 97% similarity]
lib/Checker/BasicObjCFoundationChecks.h [moved from lib/Analysis/BasicObjCFoundationChecks.h with 100% similarity]
lib/Checker/BasicStore.cpp [moved from lib/Analysis/BasicStore.cpp with 99% similarity]
lib/Checker/BasicValueFactory.cpp [moved from lib/Analysis/BasicValueFactory.cpp with 99% similarity]
lib/Checker/BugReporter.cpp [moved from lib/Analysis/BugReporter.cpp with 99% similarity]
lib/Checker/BugReporterVisitors.cpp [moved from lib/Analysis/BugReporterVisitors.cpp with 98% similarity]
lib/Checker/BuiltinFunctionChecker.cpp [moved from lib/Analysis/BuiltinFunctionChecker.cpp with 97% similarity]
lib/Checker/CFRefCount.cpp [moved from lib/Analysis/CFRefCount.cpp with 99% similarity]
lib/Checker/CMakeLists.txt [new file with mode: 0644]
lib/Checker/CallAndMessageChecker.cpp [moved from lib/Analysis/CallAndMessageChecker.cpp with 98% similarity]
lib/Checker/CallInliner.cpp [moved from lib/Analysis/CallInliner.cpp with 95% similarity]
lib/Checker/CastToStructChecker.cpp [moved from lib/Analysis/CastToStructChecker.cpp with 97% similarity]
lib/Checker/CheckDeadStores.cpp [moved from lib/Analysis/CheckDeadStores.cpp with 98% similarity]
lib/Checker/CheckObjCDealloc.cpp [moved from lib/Analysis/CheckObjCDealloc.cpp with 98% similarity]
lib/Checker/CheckObjCInstMethSignature.cpp [moved from lib/Analysis/CheckObjCInstMethSignature.cpp with 96% similarity]
lib/Checker/CheckObjCUnusedIVars.cpp [moved from lib/Analysis/CheckObjCUnusedIVars.cpp with 97% similarity]
lib/Checker/CheckSecuritySyntaxOnly.cpp [moved from lib/Analysis/CheckSecuritySyntaxOnly.cpp with 99% similarity]
lib/Checker/CheckSizeofPointer.cpp [moved from lib/Analysis/CheckSizeofPointer.cpp with 95% similarity]
lib/Checker/Checker.cpp [moved from lib/Analysis/Checker.cpp with 95% similarity]
lib/Checker/DereferenceChecker.cpp [moved from lib/Analysis/DereferenceChecker.cpp with 95% similarity]
lib/Checker/DivZeroChecker.cpp [moved from lib/Analysis/DivZeroChecker.cpp with 97% similarity]
lib/Checker/Environment.cpp [moved from lib/Analysis/Environment.cpp with 99% similarity]
lib/Checker/ExplodedGraph.cpp [moved from lib/Analysis/ExplodedGraph.cpp with 98% similarity]
lib/Checker/FixedAddressChecker.cpp [moved from lib/Analysis/FixedAddressChecker.cpp with 97% similarity]
lib/Checker/GRBlockCounter.cpp [moved from lib/Analysis/GRBlockCounter.cpp with 96% similarity]
lib/Checker/GRCoreEngine.cpp [moved from lib/Analysis/GRCoreEngine.cpp with 99% similarity]
lib/Checker/GRExprEngine.cpp [moved from lib/Analysis/GRExprEngine.cpp with 99% similarity]
lib/Checker/GRExprEngineExperimentalChecks.cpp [moved from lib/Analysis/GRExprEngineExperimentalChecks.cpp with 96% similarity]
lib/Checker/GRExprEngineExperimentalChecks.h [moved from lib/Analysis/GRExprEngineExperimentalChecks.h with 100% similarity]
lib/Checker/GRExprEngineInternalChecks.h [moved from lib/Analysis/GRExprEngineInternalChecks.h with 100% similarity]
lib/Checker/GRState.cpp [moved from lib/Analysis/GRState.cpp with 98% similarity]
lib/Checker/MallocChecker.cpp [moved from lib/Analysis/MallocChecker.cpp with 98% similarity]
lib/Checker/ManagerRegistry.cpp [moved from lib/Analysis/ManagerRegistry.cpp with 93% similarity]
lib/Checker/MemRegion.cpp [moved from lib/Analysis/MemRegion.cpp with 99% similarity]
lib/Checker/NSAutoreleasePoolChecker.cpp [moved from lib/Analysis/NSAutoreleasePoolChecker.cpp with 94% similarity]
lib/Checker/NSErrorChecker.cpp [moved from lib/Analysis/NSErrorChecker.cpp with 97% similarity]
lib/Checker/NoReturnFunctionChecker.cpp [moved from lib/Analysis/NoReturnFunctionChecker.cpp with 98% similarity]
lib/Checker/OSAtomicChecker.cpp [moved from lib/Analysis/OSAtomicChecker.cpp with 99% similarity]
lib/Checker/PathDiagnostic.cpp [moved from lib/Analysis/PathDiagnostic.cpp with 99% similarity]
lib/Checker/PointerArithChecker.cpp [moved from lib/Analysis/PointerArithChecker.cpp with 97% similarity]
lib/Checker/PointerSubChecker.cpp [moved from lib/Analysis/PointerSubChecker.cpp with 97% similarity]
lib/Checker/PthreadLockChecker.cpp [moved from lib/Analysis/PthreadLockChecker.cpp with 96% similarity]
lib/Checker/RangeConstraintManager.cpp [moved from lib/Analysis/RangeConstraintManager.cpp with 98% similarity]
lib/Checker/RegionStore.cpp [moved from lib/Analysis/RegionStore.cpp with 99% similarity]
lib/Checker/ReturnPointerRangeChecker.cpp [moved from lib/Analysis/ReturnPointerRangeChecker.cpp with 94% similarity]
lib/Checker/ReturnStackAddressChecker.cpp [moved from lib/Analysis/ReturnStackAddressChecker.cpp with 95% similarity]
lib/Checker/ReturnUndefChecker.cpp [moved from lib/Analysis/ReturnUndefChecker.cpp with 91% similarity]
lib/Checker/SVals.cpp [moved from lib/Analysis/SVals.cpp with 99% similarity]
lib/Checker/SValuator.cpp [moved from lib/Analysis/SValuator.cpp with 98% similarity]
lib/Checker/SimpleConstraintManager.cpp [moved from lib/Analysis/SimpleConstraintManager.cpp with 98% similarity]
lib/Checker/SimpleConstraintManager.h [moved from lib/Analysis/SimpleConstraintManager.h with 96% similarity]
lib/Checker/SimpleSValuator.cpp [moved from lib/Analysis/SimpleSValuator.cpp with 99% similarity]
lib/Checker/Store.cpp [moved from lib/Analysis/Store.cpp with 98% similarity]
lib/Checker/SymbolManager.cpp [moved from lib/Analysis/SymbolManager.cpp with 98% similarity]
lib/Checker/UndefBranchChecker.cpp [moved from lib/Analysis/UndefBranchChecker.cpp with 98% similarity]
lib/Checker/UndefResultChecker.cpp [moved from lib/Analysis/UndefResultChecker.cpp with 94% similarity]
lib/Checker/UndefinedArraySubscriptChecker.cpp [moved from lib/Analysis/UndefinedArraySubscriptChecker.cpp with 94% similarity]
lib/Checker/UndefinedAssignmentChecker.cpp [moved from lib/Analysis/UndefinedAssignmentChecker.cpp with 95% similarity]
lib/Checker/VLASizeChecker.cpp [moved from lib/Analysis/VLASizeChecker.cpp with 94% similarity]
lib/Checker/ValueManager.cpp [moved from lib/Analysis/ValueManager.cpp with 97% similarity]
lib/Frontend/AnalysisConsumer.cpp
lib/Frontend/HTMLDiagnostics.cpp
lib/Frontend/PlistDiagnostics.cpp
lib/Makefile
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExpr.cpp
tools/driver/CMakeLists.txt
tools/driver/Makefile