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
diff --git a/lib/Analysis/AnalysisContext.cpp b/lib/Analysis/AnalysisContext.cpp
index ad9f6dd1..0c64610 100644
--- a/lib/Analysis/AnalysisContext.cpp
+++ b/lib/Analysis/AnalysisContext.cpp
@@ -12,10 +12,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
-#include "clang/Analysis/PathSensitive/MemRegion.h"
-#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/CFG.h"
+#include "clang/Analysis/AnalysisContext.h"
+#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
@@ -87,12 +86,6 @@
return AC;
}
-const BlockDecl *BlockInvocationContext::getBlockDecl() const {
- return Data.is<const BlockDataRegion*>() ?
- Data.get<const BlockDataRegion*>()->getDecl()
- : Data.get<const BlockDecl*>();
-}
-
//===----------------------------------------------------------------------===//
// FoldingSet profiling.
//===----------------------------------------------------------------------===//
@@ -117,11 +110,7 @@
}
void BlockInvocationContext::Profile(llvm::FoldingSetNodeID &ID) {
- if (const BlockDataRegion *BR = getBlockRegion())
- Profile(ID, getAnalysisContext(), getParent(), BR);
- else
- Profile(ID, getAnalysisContext(), getParent(),
- Data.get<const BlockDecl*>());
+ Profile(ID, getAnalysisContext(), getParent(), BD);
}
//===----------------------------------------------------------------------===//
@@ -170,15 +159,6 @@
return getLocationContext<ScopeContext, Stmt>(ctx, parent, s);
}
-const BlockInvocationContext *
-LocationContextManager::getBlockInvocation(AnalysisContext *ctx,
- const LocationContext *parent,
- const BlockDataRegion *BR) {
- return getLocationContext<BlockInvocationContext, BlockDataRegion>(ctx,
- parent,
- BR);
-}
-
//===----------------------------------------------------------------------===//
// LocationContext methods.
//===----------------------------------------------------------------------===//
diff --git a/lib/Analysis/CMakeLists.txt b/lib/Analysis/CMakeLists.txt
index 521f1be..0cadca5 100644
--- a/lib/Analysis/CMakeLists.txt
+++ b/lib/Analysis/CMakeLists.txt
@@ -2,67 +2,9 @@
add_clang_library(clangAnalysis
AnalysisContext.cpp
- ArrayBoundChecker.cpp
- AttrNonNullChecker.cpp
- BasicConstraintManager.cpp
- BasicObjCFoundationChecks.cpp
- BasicStore.cpp
- BasicValueFactory.cpp
- BugReporter.cpp
- BugReporterVisitors.cpp
- BuiltinFunctionChecker.cpp
CFG.cpp
- CFRefCount.cpp
- CallAndMessageChecker.cpp
- CallInliner.cpp
- CastToStructChecker.cpp
- CheckDeadStores.cpp
- CheckObjCDealloc.cpp
- CheckObjCInstMethSignature.cpp
- CheckObjCUnusedIVars.cpp
- CheckSecuritySyntaxOnly.cpp
- CheckSizeofPointer.cpp
- Checker.cpp
- DereferenceChecker.cpp
- DivZeroChecker.cpp
- Environment.cpp
- ExplodedGraph.cpp
- FixedAddressChecker.cpp
- GRBlockCounter.cpp
- GRCoreEngine.cpp
- GRExprEngine.cpp
- GRExprEngineExperimentalChecks.cpp
- GRState.cpp
LiveVariables.cpp
- MallocChecker.cpp
- ManagerRegistry.cpp
- MemRegion.cpp
- NoReturnFunctionChecker.cpp
- NSAutoreleasePoolChecker.cpp
- NSErrorChecker.cpp
- OSAtomicChecker.cpp
- PathDiagnostic.cpp
- PointerArithChecker.cpp
- PointerSubChecker.cpp
- PthreadLockChecker.cpp
- RangeConstraintManager.cpp
- RegionStore.cpp
- ReturnPointerRangeChecker.cpp
- ReturnStackAddressChecker.cpp
- ReturnUndefChecker.cpp
- SVals.cpp
- SValuator.cpp
- SimpleConstraintManager.cpp
- SimpleSValuator.cpp
- Store.cpp
- SymbolManager.cpp
- UndefBranchChecker.cpp
- UndefResultChecker.cpp
- UndefinedArraySubscriptChecker.cpp
- UndefinedAssignmentChecker.cpp
UninitializedValues.cpp
- VLASizeChecker.cpp
- ValueManager.cpp
)
add_dependencies(clangAnalysis ClangDiagnosticAnalysis)
diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp
index 0b2620e..94ed752 100644
--- a/lib/Analysis/LiveVariables.cpp
+++ b/lib/Analysis/LiveVariables.cpp
@@ -19,7 +19,7 @@
#include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h"
#include "clang/Analysis/FlowSensitive/DataflowSolver.h"
#include "clang/Analysis/Support/SaveAndRestore.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Analysis/AnalysisContext.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/lib/Analysis/UninitializedValues.cpp b/lib/Analysis/UninitializedValues.cpp
index 6fa4b53..bdc0e7c 100644
--- a/lib/Analysis/UninitializedValues.cpp
+++ b/lib/Analysis/UninitializedValues.cpp
@@ -13,7 +13,6 @@
#include "clang/Analysis/Analyses/UninitializedValues.h"
#include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h"
-#include "clang/Analysis/LocalCheckers.h"
#include "clang/Analysis/AnalysisDiagnostic.h"
#include "clang/AST/ASTContext.h"
#include "clang/Analysis/FlowSensitive/DataflowSolver.h"
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 2bfaa44..bc2cd46 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -10,3 +10,4 @@
add_subdirectory(Driver)
add_subdirectory(Frontend)
add_subdirectory(Index)
+add_subdirectory(Checker)
diff --git a/lib/Analysis/ArrayBoundChecker.cpp b/lib/Checker/ArrayBoundChecker.cpp
similarity index 93%
rename from lib/Analysis/ArrayBoundChecker.cpp
rename to lib/Checker/ArrayBoundChecker.cpp
index 49c8606..0c3e3e9 100644
--- a/lib/Analysis/ArrayBoundChecker.cpp
+++ b/lib/Checker/ArrayBoundChecker.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
using namespace clang;
diff --git a/lib/Analysis/AttrNonNullChecker.cpp b/lib/Checker/AttrNonNullChecker.cpp
similarity index 96%
rename from lib/Analysis/AttrNonNullChecker.cpp
rename to lib/Checker/AttrNonNullChecker.cpp
index aa21700..c9e0e40 100644
--- a/lib/Analysis/AttrNonNullChecker.cpp
+++ b/lib/Checker/AttrNonNullChecker.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/BasicConstraintManager.cpp b/lib/Checker/BasicConstraintManager.cpp
similarity index 98%
rename from lib/Analysis/BasicConstraintManager.cpp
rename to lib/Checker/BasicConstraintManager.cpp
index 6dfc470..e89546e 100644
--- a/lib/Analysis/BasicConstraintManager.cpp
+++ b/lib/Checker/BasicConstraintManager.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "SimpleConstraintManager.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
-#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Checker/BasicObjCFoundationChecks.cpp
similarity index 96%
rename from lib/Analysis/BasicObjCFoundationChecks.cpp
rename to lib/Checker/BasicObjCFoundationChecks.cpp
index 67483d9..f410767 100644
--- a/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/lib/Checker/BasicObjCFoundationChecks.cpp
@@ -15,15 +15,15 @@
#include "BasicObjCFoundationChecks.h"
-#include "clang/Analysis/PathSensitive/ExplodedGraph.h"
-#include "clang/Analysis/PathSensitive/GRSimpleAPICheck.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/MemRegion.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/PathSensitive/ExplodedGraph.h"
+#include "clang/Checker/PathSensitive/GRSimpleAPICheck.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/MemRegion.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/LocalCheckers.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprObjC.h"
diff --git a/lib/Analysis/BasicObjCFoundationChecks.h b/lib/Checker/BasicObjCFoundationChecks.h
similarity index 100%
rename from lib/Analysis/BasicObjCFoundationChecks.h
rename to lib/Checker/BasicObjCFoundationChecks.h
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Checker/BasicStore.cpp
similarity index 99%
rename from lib/Analysis/BasicStore.cpp
rename to lib/Checker/BasicStore.cpp
index 224281b..0c95940 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Checker/BasicStore.cpp
@@ -13,8 +13,8 @@
#include "clang/AST/ExprObjC.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Analysis/AnalysisContext.h"
+#include "clang/Checker/PathSensitive/GRState.h"
#include "llvm/ADT/ImmutableMap.h"
using namespace clang;
diff --git a/lib/Analysis/BasicValueFactory.cpp b/lib/Checker/BasicValueFactory.cpp
similarity index 98%
rename from lib/Analysis/BasicValueFactory.cpp
rename to lib/Checker/BasicValueFactory.cpp
index b33c277..3b01e23 100644
--- a/lib/Analysis/BasicValueFactory.cpp
+++ b/lib/Checker/BasicValueFactory.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/BasicValueFactory.h"
+#include "clang/Checker/PathSensitive/BasicValueFactory.h"
using namespace clang;
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Checker/BugReporter.cpp
similarity index 99%
rename from lib/Analysis/BugReporter.cpp
rename to lib/Checker/BugReporter.cpp
index 2a9531d..1afb8c7 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Checker/BugReporter.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
#include "clang/AST/ASTContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/AST/Expr.h"
@@ -21,7 +21,7 @@
#include "clang/AST/StmtObjC.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Analysis/ProgramPoint.h"
-#include "clang/Analysis/PathDiagnostic.h"
+#include "clang/Checker/PathDiagnostic.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
diff --git a/lib/Analysis/BugReporterVisitors.cpp b/lib/Checker/BugReporterVisitors.cpp
similarity index 98%
rename from lib/Analysis/BugReporterVisitors.cpp
rename to lib/Checker/BugReporterVisitors.cpp
index 87de30a..9826194 100644
--- a/lib/Analysis/BugReporterVisitors.cpp
+++ b/lib/Checker/BugReporterVisitors.cpp
@@ -14,9 +14,9 @@
#include "clang/AST/Expr.h"
#include "clang/AST/ExprObjC.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/GRState.h"
using namespace clang;
diff --git a/lib/Analysis/BuiltinFunctionChecker.cpp b/lib/Checker/BuiltinFunctionChecker.cpp
similarity index 97%
rename from lib/Analysis/BuiltinFunctionChecker.cpp
rename to lib/Checker/BuiltinFunctionChecker.cpp
index a89ad21..8711492 100644
--- a/lib/Analysis/BuiltinFunctionChecker.cpp
+++ b/lib/Checker/BuiltinFunctionChecker.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
#include "clang/Basic/Builtins.h"
#include "llvm/ADT/StringSwitch.h"
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Checker/CFRefCount.cpp
similarity index 99%
rename from lib/Analysis/CFRefCount.cpp
rename to lib/Checker/CFRefCount.cpp
index 5a15fbf..a128f90 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Checker/CFRefCount.cpp
@@ -14,15 +14,15 @@
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceManager.h"
-#include "clang/Analysis/PathSensitive/GRExprEngineBuilders.h"
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/LocalCheckers.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
-#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngineBuilders.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/LocalCheckers.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/ADT/DenseMap.h"
diff --git a/lib/Checker/CMakeLists.txt b/lib/Checker/CMakeLists.txt
new file mode 100644
index 0000000..a1cd991
--- /dev/null
+++ b/lib/Checker/CMakeLists.txt
@@ -0,0 +1,62 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangChecker
+ ArrayBoundChecker.cpp
+ AttrNonNullChecker.cpp
+ BasicConstraintManager.cpp
+ BasicObjCFoundationChecks.cpp
+ BasicStore.cpp
+ BasicValueFactory.cpp
+ BugReporter.cpp
+ BugReporterVisitors.cpp
+ BuiltinFunctionChecker.cpp
+ CFRefCount.cpp
+ CallAndMessageChecker.cpp
+ CallInliner.cpp
+ CastToStructChecker.cpp
+ CheckDeadStores.cpp
+ CheckObjCDealloc.cpp
+ CheckObjCInstMethSignature.cpp
+ CheckObjCUnusedIVars.cpp
+ CheckSecuritySyntaxOnly.cpp
+ CheckSizeofPointer.cpp
+ Checker.cpp
+ DereferenceChecker.cpp
+ DivZeroChecker.cpp
+ Environment.cpp
+ ExplodedGraph.cpp
+ FixedAddressChecker.cpp
+ GRBlockCounter.cpp
+ GRCoreEngine.cpp
+ GRExprEngine.cpp
+ GRExprEngineExperimentalChecks.cpp
+ GRState.cpp
+ MallocChecker.cpp
+ ManagerRegistry.cpp
+ MemRegion.cpp
+ NSAutoreleasePoolChecker.cpp
+ NSErrorChecker.cpp
+ NoReturnFunctionChecker.cpp
+ OSAtomicChecker.cpp
+ PathDiagnostic.cpp
+ PointerArithChecker.cpp
+ PointerSubChecker.cpp
+ PthreadLockChecker.cpp
+ RangeConstraintManager.cpp
+ RegionStore.cpp
+ ReturnPointerRangeChecker.cpp
+ ReturnStackAddressChecker.cpp
+ ReturnUndefChecker.cpp
+ SVals.cpp
+ SValuator.cpp
+ SimpleConstraintManager.cpp
+ SimpleSValuator.cpp
+ Store.cpp
+ SymbolManager.cpp
+ UndefBranchChecker.cpp
+ UndefResultChecker.cpp
+ UndefinedArraySubscriptChecker.cpp
+ UndefinedAssignmentChecker.cpp
+ VLASizeChecker.cpp
+ ValueManager.cpp
+ )
diff --git a/lib/Analysis/CallAndMessageChecker.cpp b/lib/Checker/CallAndMessageChecker.cpp
similarity index 98%
rename from lib/Analysis/CallAndMessageChecker.cpp
rename to lib/Checker/CallAndMessageChecker.cpp
index c287354..c8739fd 100644
--- a/lib/Analysis/CallAndMessageChecker.cpp
+++ b/lib/Checker/CallAndMessageChecker.cpp
@@ -13,8 +13,8 @@
//===----------------------------------------------------------------------===//
#include "clang/Basic/TargetInfo.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "clang/AST/ParentMap.h"
#include "GRExprEngineInternalChecks.h"
diff --git a/lib/Analysis/CallInliner.cpp b/lib/Checker/CallInliner.cpp
similarity index 95%
rename from lib/Analysis/CallInliner.cpp
rename to lib/Checker/CallInliner.cpp
index d18bbcc..8d4596d 100644
--- a/lib/Analysis/CallInliner.cpp
+++ b/lib/Checker/CallInliner.cpp
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/LocalCheckers.h"
using namespace clang;
diff --git a/lib/Analysis/CastToStructChecker.cpp b/lib/Checker/CastToStructChecker.cpp
similarity index 97%
rename from lib/Analysis/CastToStructChecker.cpp
rename to lib/Checker/CastToStructChecker.cpp
index 219c09f..bef5bc2 100644
--- a/lib/Analysis/CastToStructChecker.cpp
+++ b/lib/Checker/CastToStructChecker.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/CheckDeadStores.cpp b/lib/Checker/CheckDeadStores.cpp
similarity index 98%
rename from lib/Analysis/CheckDeadStores.cpp
rename to lib/Checker/CheckDeadStores.cpp
index 6e4d899..91c9bb3 100644
--- a/lib/Analysis/CheckDeadStores.cpp
+++ b/lib/Checker/CheckDeadStores.cpp
@@ -12,11 +12,11 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/LocalCheckers.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/Visitors/CFGRecStmtVisitor.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
#include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/AST/ASTContext.h"
diff --git a/lib/Analysis/CheckObjCDealloc.cpp b/lib/Checker/CheckObjCDealloc.cpp
similarity index 97%
rename from lib/Analysis/CheckObjCDealloc.cpp
rename to lib/Checker/CheckObjCDealloc.cpp
index 87c1f27..7888c7a 100644
--- a/lib/Analysis/CheckObjCDealloc.cpp
+++ b/lib/Checker/CheckObjCDealloc.cpp
@@ -13,9 +13,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/LocalCheckers.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/LocalCheckers.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/DeclObjC.h"
diff --git a/lib/Analysis/CheckObjCInstMethSignature.cpp b/lib/Checker/CheckObjCInstMethSignature.cpp
similarity index 96%
rename from lib/Analysis/CheckObjCInstMethSignature.cpp
rename to lib/Checker/CheckObjCInstMethSignature.cpp
index 10ba896..67485c6 100644
--- a/lib/Analysis/CheckObjCInstMethSignature.cpp
+++ b/lib/Checker/CheckObjCInstMethSignature.cpp
@@ -13,9 +13,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/LocalCheckers.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/LocalCheckers.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Type.h"
#include "clang/AST/ASTContext.h"
diff --git a/lib/Analysis/CheckObjCUnusedIVars.cpp b/lib/Checker/CheckObjCUnusedIVars.cpp
similarity index 96%
rename from lib/Analysis/CheckObjCUnusedIVars.cpp
rename to lib/Checker/CheckObjCUnusedIVars.cpp
index d4067c9..27dc45f 100644
--- a/lib/Analysis/CheckObjCUnusedIVars.cpp
+++ b/lib/Checker/CheckObjCUnusedIVars.cpp
@@ -13,9 +13,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/LocalCheckers.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/LocalCheckers.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/DeclObjC.h"
diff --git a/lib/Analysis/CheckSecuritySyntaxOnly.cpp b/lib/Checker/CheckSecuritySyntaxOnly.cpp
similarity index 99%
rename from lib/Analysis/CheckSecuritySyntaxOnly.cpp
rename to lib/Checker/CheckSecuritySyntaxOnly.cpp
index f4874a5..3bf7a60 100644
--- a/lib/Analysis/CheckSecuritySyntaxOnly.cpp
+++ b/lib/Checker/CheckSecuritySyntaxOnly.cpp
@@ -12,8 +12,8 @@
//===----------------------------------------------------------------------===//
#include "clang/Basic/TargetInfo.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/LocalCheckers.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/lib/Analysis/CheckSizeofPointer.cpp b/lib/Checker/CheckSizeofPointer.cpp
similarity index 95%
rename from lib/Analysis/CheckSizeofPointer.cpp
rename to lib/Checker/CheckSizeofPointer.cpp
index 4f5da9f..3f40235 100644
--- a/lib/Analysis/CheckSizeofPointer.cpp
+++ b/lib/Checker/CheckSizeofPointer.cpp
@@ -12,9 +12,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "clang/AST/StmtVisitor.h"
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/LocalCheckers.h"
using namespace clang;
diff --git a/lib/Analysis/Checker.cpp b/lib/Checker/Checker.cpp
similarity index 95%
rename from lib/Analysis/Checker.cpp
rename to lib/Checker/Checker.cpp
index fb9d04d..36323b9 100644
--- a/lib/Analysis/Checker.cpp
+++ b/lib/Checker/Checker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
using namespace clang;
Checker::~Checker() {}
diff --git a/lib/Analysis/DereferenceChecker.cpp b/lib/Checker/DereferenceChecker.cpp
similarity index 94%
rename from lib/Analysis/DereferenceChecker.cpp
rename to lib/Checker/DereferenceChecker.cpp
index 98243874d..623aed2 100644
--- a/lib/Analysis/DereferenceChecker.cpp
+++ b/lib/Checker/DereferenceChecker.cpp
@@ -12,10 +12,10 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/Checkers/DereferenceChecker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/DivZeroChecker.cpp b/lib/Checker/DivZeroChecker.cpp
similarity index 97%
rename from lib/Analysis/DivZeroChecker.cpp
rename to lib/Checker/DivZeroChecker.cpp
index 266c236..e1346e1 100644
--- a/lib/Analysis/DivZeroChecker.cpp
+++ b/lib/Checker/DivZeroChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/Environment.cpp b/lib/Checker/Environment.cpp
similarity index 98%
rename from lib/Analysis/Environment.cpp
rename to lib/Checker/Environment.cpp
index f04cf7b..c2c9190 100644
--- a/lib/Analysis/Environment.cpp
+++ b/lib/Checker/Environment.cpp
@@ -10,7 +10,7 @@
// This file defined the Environment and EnvironmentManager classes.
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRState.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "llvm/ADT/ImmutableMap.h"
diff --git a/lib/Analysis/ExplodedGraph.cpp b/lib/Checker/ExplodedGraph.cpp
similarity index 98%
rename from lib/Analysis/ExplodedGraph.cpp
rename to lib/Checker/ExplodedGraph.cpp
index 3b339ff..20429b9 100644
--- a/lib/Analysis/ExplodedGraph.cpp
+++ b/lib/Checker/ExplodedGraph.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/ExplodedGraph.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/ExplodedGraph.h"
+#include "clang/Checker/PathSensitive/GRState.h"
#include "clang/AST/Stmt.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/DenseMap.h"
diff --git a/lib/Analysis/FixedAddressChecker.cpp b/lib/Checker/FixedAddressChecker.cpp
similarity index 96%
rename from lib/Analysis/FixedAddressChecker.cpp
rename to lib/Checker/FixedAddressChecker.cpp
index 031ca44..04c17d6 100644
--- a/lib/Analysis/FixedAddressChecker.cpp
+++ b/lib/Checker/FixedAddressChecker.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/GRBlockCounter.cpp b/lib/Checker/GRBlockCounter.cpp
similarity index 96%
rename from lib/Analysis/GRBlockCounter.cpp
rename to lib/Checker/GRBlockCounter.cpp
index 4f4103a..3fa3e1e 100644
--- a/lib/Analysis/GRBlockCounter.cpp
+++ b/lib/Checker/GRBlockCounter.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/GRBlockCounter.h"
+#include "clang/Checker/PathSensitive/GRBlockCounter.h"
#include "llvm/ADT/ImmutableMap.h"
using namespace clang;
diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Checker/GRCoreEngine.cpp
similarity index 98%
rename from lib/Analysis/GRCoreEngine.cpp
rename to lib/Checker/GRCoreEngine.cpp
index 209452a..d54b077 100644
--- a/lib/Analysis/GRCoreEngine.cpp
+++ b/lib/Checker/GRCoreEngine.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/GRCoreEngine.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRCoreEngine.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
#include "clang/AST/Expr.h"
#include "llvm/Support/Casting.h"
#include "llvm/ADT/DenseMap.h"
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp
similarity index 99%
rename from lib/Analysis/GRExprEngine.cpp
rename to lib/Checker/GRExprEngine.cpp
index 8f8d859..458c0f4 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Checker/GRExprEngine.cpp
@@ -14,9 +14,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/GRExprEngineBuilders.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRExprEngineBuilders.h"
+#include "clang/Checker/PathSensitive/Checker.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/ParentMap.h"
#include "clang/AST/StmtObjC.h"
diff --git a/lib/Analysis/GRExprEngineExperimentalChecks.cpp b/lib/Checker/GRExprEngineExperimentalChecks.cpp
similarity index 96%
rename from lib/Analysis/GRExprEngineExperimentalChecks.cpp
rename to lib/Checker/GRExprEngineExperimentalChecks.cpp
index 33479b0..1e94c93 100644
--- a/lib/Analysis/GRExprEngineExperimentalChecks.cpp
+++ b/lib/Checker/GRExprEngineExperimentalChecks.cpp
@@ -14,7 +14,7 @@
#include "GRExprEngineInternalChecks.h"
#include "GRExprEngineExperimentalChecks.h"
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/LocalCheckers.h"
using namespace clang;
diff --git a/lib/Analysis/GRExprEngineExperimentalChecks.h b/lib/Checker/GRExprEngineExperimentalChecks.h
similarity index 100%
rename from lib/Analysis/GRExprEngineExperimentalChecks.h
rename to lib/Checker/GRExprEngineExperimentalChecks.h
diff --git a/lib/Analysis/GRExprEngineInternalChecks.h b/lib/Checker/GRExprEngineInternalChecks.h
similarity index 100%
rename from lib/Analysis/GRExprEngineInternalChecks.h
rename to lib/Checker/GRExprEngineInternalChecks.h
diff --git a/lib/Analysis/GRState.cpp b/lib/Checker/GRState.cpp
similarity index 98%
rename from lib/Analysis/GRState.cpp
rename to lib/Checker/GRState.cpp
index 051d465..2e95206 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Checker/GRState.cpp
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/lib/Analysis/MallocChecker.cpp b/lib/Checker/MallocChecker.cpp
similarity index 97%
rename from lib/Analysis/MallocChecker.cpp
rename to lib/Checker/MallocChecker.cpp
index 28f4db7..3be2e02 100644
--- a/lib/Analysis/MallocChecker.cpp
+++ b/lib/Checker/MallocChecker.cpp
@@ -13,10 +13,10 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineExperimentalChecks.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
#include "llvm/ADT/ImmutableMap.h"
using namespace clang;
diff --git a/lib/Analysis/ManagerRegistry.cpp b/lib/Checker/ManagerRegistry.cpp
similarity index 93%
rename from lib/Analysis/ManagerRegistry.cpp
rename to lib/Checker/ManagerRegistry.cpp
index 8943db2..d11a997 100644
--- a/lib/Analysis/ManagerRegistry.cpp
+++ b/lib/Checker/ManagerRegistry.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/ManagerRegistry.h"
+#include "clang/Checker/ManagerRegistry.h"
using namespace clang;
diff --git a/lib/Analysis/MemRegion.cpp b/lib/Checker/MemRegion.cpp
similarity index 98%
rename from lib/Analysis/MemRegion.cpp
rename to lib/Checker/MemRegion.cpp
index 87d60d3..1e82883 100644
--- a/lib/Analysis/MemRegion.cpp
+++ b/lib/Checker/MemRegion.cpp
@@ -13,12 +13,11 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/raw_ostream.h"
-#include "clang/Analysis/PathSensitive/MemRegion.h"
-#include "clang/Analysis/PathSensitive/ValueManager.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Analysis/AnalysisContext.h"
+#include "clang/Checker/PathSensitive/MemRegion.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/StmtVisitor.h"
+#include "llvm/Support/raw_ostream.h"
using namespace clang;
diff --git a/lib/Analysis/NSAutoreleasePoolChecker.cpp b/lib/Checker/NSAutoreleasePoolChecker.cpp
similarity index 93%
rename from lib/Analysis/NSAutoreleasePoolChecker.cpp
rename to lib/Checker/NSAutoreleasePoolChecker.cpp
index 2ff0487..c6530ec 100644
--- a/lib/Analysis/NSAutoreleasePoolChecker.cpp
+++ b/lib/Checker/NSAutoreleasePoolChecker.cpp
@@ -15,9 +15,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "BasicObjCFoundationChecks.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Decl.h"
diff --git a/lib/Analysis/NSErrorChecker.cpp b/lib/Checker/NSErrorChecker.cpp
similarity index 96%
rename from lib/Analysis/NSErrorChecker.cpp
rename to lib/Checker/NSErrorChecker.cpp
index e3cf57f..dd20e7a 100644
--- a/lib/Analysis/NSErrorChecker.cpp
+++ b/lib/Checker/NSErrorChecker.cpp
@@ -15,10 +15,10 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/LocalCheckers.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h"
+#include "clang/Checker/LocalCheckers.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/Checkers/DereferenceChecker.h"
#include "BasicObjCFoundationChecks.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Decl.h"
diff --git a/lib/Analysis/NoReturnFunctionChecker.cpp b/lib/Checker/NoReturnFunctionChecker.cpp
similarity index 97%
rename from lib/Analysis/NoReturnFunctionChecker.cpp
rename to lib/Checker/NoReturnFunctionChecker.cpp
index 5cfd9ac..1455d87 100644
--- a/lib/Analysis/NoReturnFunctionChecker.cpp
+++ b/lib/Checker/NoReturnFunctionChecker.cpp
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
#include "llvm/ADT/StringSwitch.h"
using namespace clang;
diff --git a/lib/Analysis/OSAtomicChecker.cpp b/lib/Checker/OSAtomicChecker.cpp
similarity index 98%
rename from lib/Analysis/OSAtomicChecker.cpp
rename to lib/Checker/OSAtomicChecker.cpp
index 9d34e9e..f84388a 100644
--- a/lib/Analysis/OSAtomicChecker.cpp
+++ b/lib/Checker/OSAtomicChecker.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
#include "clang/Basic/Builtins.h"
#include "llvm/ADT/StringSwitch.h"
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Checker/PathDiagnostic.cpp
similarity index 99%
rename from lib/Analysis/PathDiagnostic.cpp
rename to lib/Checker/PathDiagnostic.cpp
index 734570a..e95fcc2 100644
--- a/lib/Analysis/PathDiagnostic.cpp
+++ b/lib/Checker/PathDiagnostic.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathDiagnostic.h"
+#include "clang/Checker/PathDiagnostic.h"
#include "clang/AST/Expr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
diff --git a/lib/Analysis/PointerArithChecker.cpp b/lib/Checker/PointerArithChecker.cpp
similarity index 97%
rename from lib/Analysis/PointerArithChecker.cpp
rename to lib/Checker/PointerArithChecker.cpp
index 370233c..3d62d0c 100644
--- a/lib/Analysis/PointerArithChecker.cpp
+++ b/lib/Checker/PointerArithChecker.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/PointerSubChecker.cpp b/lib/Checker/PointerSubChecker.cpp
similarity index 97%
rename from lib/Analysis/PointerSubChecker.cpp
rename to lib/Checker/PointerSubChecker.cpp
index c597a25..acc848a 100644
--- a/lib/Analysis/PointerSubChecker.cpp
+++ b/lib/Checker/PointerSubChecker.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/PthreadLockChecker.cpp b/lib/Checker/PthreadLockChecker.cpp
similarity index 95%
rename from lib/Analysis/PthreadLockChecker.cpp
rename to lib/Checker/PthreadLockChecker.cpp
index e95095c..da1f7f3 100644
--- a/lib/Analysis/PthreadLockChecker.cpp
+++ b/lib/Checker/PthreadLockChecker.cpp
@@ -12,9 +12,9 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
#include "GRExprEngineExperimentalChecks.h"
#include "llvm/ADT/ImmutableSet.h"
diff --git a/lib/Analysis/RangeConstraintManager.cpp b/lib/Checker/RangeConstraintManager.cpp
similarity index 97%
rename from lib/Analysis/RangeConstraintManager.cpp
rename to lib/Checker/RangeConstraintManager.cpp
index 2cf3dfb..c904c33 100644
--- a/lib/Analysis/RangeConstraintManager.cpp
+++ b/lib/Checker/RangeConstraintManager.cpp
@@ -13,10 +13,10 @@
//===----------------------------------------------------------------------===//
#include "SimpleConstraintManager.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
-#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
-#include "clang/Analysis/ManagerRegistry.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
+#include "clang/Checker/ManagerRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/ImmutableSet.h"
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Checker/RegionStore.cpp
similarity index 99%
rename from lib/Analysis/RegionStore.cpp
rename to lib/Checker/RegionStore.cpp
index a735ed9..39686c2 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Checker/RegionStore.cpp
@@ -14,10 +14,10 @@
// parameters are created lazily.
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/MemRegion.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRStateTrait.h"
+#include "clang/Checker/PathSensitive/MemRegion.h"
+#include "clang/Analysis/AnalysisContext.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRStateTrait.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/Support/Optional.h"
#include "clang/Basic/TargetInfo.h"
diff --git a/lib/Analysis/ReturnPointerRangeChecker.cpp b/lib/Checker/ReturnPointerRangeChecker.cpp
similarity index 94%
rename from lib/Analysis/ReturnPointerRangeChecker.cpp
rename to lib/Checker/ReturnPointerRangeChecker.cpp
index b0350cb..0a19254 100644
--- a/lib/Analysis/ReturnPointerRangeChecker.cpp
+++ b/lib/Checker/ReturnPointerRangeChecker.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
using namespace clang;
diff --git a/lib/Analysis/ReturnStackAddressChecker.cpp b/lib/Checker/ReturnStackAddressChecker.cpp
similarity index 95%
rename from lib/Analysis/ReturnStackAddressChecker.cpp
rename to lib/Checker/ReturnStackAddressChecker.cpp
index 4d7e8ad..3f40bc3 100644
--- a/lib/Analysis/ReturnStackAddressChecker.cpp
+++ b/lib/Checker/ReturnStackAddressChecker.cpp
@@ -14,9 +14,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/SmallString.h"
diff --git a/lib/Analysis/ReturnUndefChecker.cpp b/lib/Checker/ReturnUndefChecker.cpp
similarity index 91%
rename from lib/Analysis/ReturnUndefChecker.cpp
rename to lib/Checker/ReturnUndefChecker.cpp
index 7cd7126..7180bd5 100644
--- a/lib/Analysis/ReturnUndefChecker.cpp
+++ b/lib/Checker/ReturnUndefChecker.cpp
@@ -14,9 +14,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
#include "llvm/ADT/SmallString.h"
using namespace clang;
diff --git a/lib/Analysis/SVals.cpp b/lib/Checker/SVals.cpp
similarity index 99%
rename from lib/Analysis/SVals.cpp
rename to lib/Checker/SVals.cpp
index fbdb73b..efa5521 100644
--- a/lib/Analysis/SVals.cpp
+++ b/lib/Checker/SVals.cpp
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRState.h"
#include "clang/Basic/IdentifierTable.h"
using namespace clang;
diff --git a/lib/Analysis/SValuator.cpp b/lib/Checker/SValuator.cpp
similarity index 97%
rename from lib/Analysis/SValuator.cpp
rename to lib/Checker/SValuator.cpp
index 8392fcf..66cd319 100644
--- a/lib/Analysis/SValuator.cpp
+++ b/lib/Checker/SValuator.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/SValuator.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/SValuator.h"
+#include "clang/Checker/PathSensitive/GRState.h"
using namespace clang;
diff --git a/lib/Analysis/SimpleConstraintManager.cpp b/lib/Checker/SimpleConstraintManager.cpp
similarity index 97%
rename from lib/Analysis/SimpleConstraintManager.cpp
rename to lib/Checker/SimpleConstraintManager.cpp
index eca20d5..8c423a9 100644
--- a/lib/Analysis/SimpleConstraintManager.cpp
+++ b/lib/Checker/SimpleConstraintManager.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "SimpleConstraintManager.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/Checker.h"
namespace clang {
diff --git a/lib/Analysis/SimpleConstraintManager.h b/lib/Checker/SimpleConstraintManager.h
similarity index 96%
rename from lib/Analysis/SimpleConstraintManager.h
rename to lib/Checker/SimpleConstraintManager.h
index 8182398..5f20e00 100644
--- a/lib/Analysis/SimpleConstraintManager.h
+++ b/lib/Checker/SimpleConstraintManager.h
@@ -14,8 +14,8 @@
#ifndef LLVM_CLANG_ANALYSIS_SIMPLE_CONSTRAINT_MANAGER_H
#define LLVM_CLANG_ANALYSIS_SIMPLE_CONSTRAINT_MANAGER_H
-#include "clang/Analysis/PathSensitive/ConstraintManager.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/ConstraintManager.h"
+#include "clang/Checker/PathSensitive/GRState.h"
namespace clang {
diff --git a/lib/Analysis/SimpleSValuator.cpp b/lib/Checker/SimpleSValuator.cpp
similarity index 98%
rename from lib/Analysis/SimpleSValuator.cpp
rename to lib/Checker/SimpleSValuator.cpp
index 8f2f5a1..7c6e090 100644
--- a/lib/Analysis/SimpleSValuator.cpp
+++ b/lib/Checker/SimpleSValuator.cpp
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/SValuator.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/SValuator.h"
+#include "clang/Checker/PathSensitive/GRState.h"
using namespace clang;
diff --git a/lib/Analysis/Store.cpp b/lib/Checker/Store.cpp
similarity index 98%
rename from lib/Analysis/Store.cpp
rename to lib/Checker/Store.cpp
index 1724a92..98b86a9 100644
--- a/lib/Analysis/Store.cpp
+++ b/lib/Checker/Store.cpp
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/Store.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/Store.h"
+#include "clang/Checker/PathSensitive/GRState.h"
#include "clang/AST/CharUnits.h"
using namespace clang;
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Checker/SymbolManager.cpp
similarity index 98%
rename from lib/Analysis/SymbolManager.cpp
rename to lib/Checker/SymbolManager.cpp
index 3fe36b0..40bdcf6 100644
--- a/lib/Analysis/SymbolManager.cpp
+++ b/lib/Checker/SymbolManager.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
-#include "clang/Analysis/PathSensitive/MemRegion.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/MemRegion.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
diff --git a/lib/Analysis/UndefBranchChecker.cpp b/lib/Checker/UndefBranchChecker.cpp
similarity index 98%
rename from lib/Analysis/UndefBranchChecker.cpp
rename to lib/Checker/UndefBranchChecker.cpp
index c739d1a..e047b18 100644
--- a/lib/Analysis/UndefBranchChecker.cpp
+++ b/lib/Checker/UndefBranchChecker.cpp
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
using namespace clang;
diff --git a/lib/Analysis/UndefResultChecker.cpp b/lib/Checker/UndefResultChecker.cpp
similarity index 93%
rename from lib/Analysis/UndefResultChecker.cpp
rename to lib/Checker/UndefResultChecker.cpp
index acc86dd..4408c47 100644
--- a/lib/Analysis/UndefResultChecker.cpp
+++ b/lib/Checker/UndefResultChecker.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
using namespace clang;
diff --git a/lib/Analysis/UndefinedArraySubscriptChecker.cpp b/lib/Checker/UndefinedArraySubscriptChecker.cpp
similarity index 93%
rename from lib/Analysis/UndefinedArraySubscriptChecker.cpp
rename to lib/Checker/UndefinedArraySubscriptChecker.cpp
index d6aacaf..b20154d 100644
--- a/lib/Analysis/UndefinedArraySubscriptChecker.cpp
+++ b/lib/Checker/UndefinedArraySubscriptChecker.cpp
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "GRExprEngineInternalChecks.h"
using namespace clang;
diff --git a/lib/Analysis/UndefinedAssignmentChecker.cpp b/lib/Checker/UndefinedAssignmentChecker.cpp
similarity index 94%
rename from lib/Analysis/UndefinedAssignmentChecker.cpp
rename to lib/Checker/UndefinedAssignmentChecker.cpp
index 4630b82..6edc3d8 100644
--- a/lib/Analysis/UndefinedAssignmentChecker.cpp
+++ b/lib/Checker/UndefinedAssignmentChecker.cpp
@@ -13,8 +13,8 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
using namespace clang;
diff --git a/lib/Analysis/VLASizeChecker.cpp b/lib/Checker/VLASizeChecker.cpp
similarity index 94%
rename from lib/Analysis/VLASizeChecker.cpp
rename to lib/Checker/VLASizeChecker.cpp
index 2690d6f..b41126c 100644
--- a/lib/Analysis/VLASizeChecker.cpp
+++ b/lib/Checker/VLASizeChecker.cpp
@@ -13,9 +13,9 @@
//===----------------------------------------------------------------------===//
#include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
using namespace clang;
diff --git a/lib/Analysis/ValueManager.cpp b/lib/Checker/ValueManager.cpp
similarity index 97%
rename from lib/Analysis/ValueManager.cpp
rename to lib/Checker/ValueManager.cpp
index d091373..5359489 100644
--- a/lib/Analysis/ValueManager.cpp
+++ b/lib/Checker/ValueManager.cpp
@@ -13,8 +13,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/ValueManager.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Checker/PathSensitive/ValueManager.h"
+#include "clang/Analysis/AnalysisContext.h"
using namespace clang;
using namespace llvm;
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp
index 45a3b15..d73114e 100644
--- a/lib/Frontend/AnalysisConsumer.cpp
+++ b/lib/Frontend/AnalysisConsumer.cpp
@@ -18,14 +18,15 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/ParentMap.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
+#include "clang/Analysis/Analyses/UninitializedValues.h"
#include "clang/Analysis/CFG.h"
-#include "clang/Analysis/LocalCheckers.h"
-#include "clang/Analysis/ManagerRegistry.h"
-#include "clang/Analysis/PathDiagnostic.h"
-#include "clang/Analysis/PathSensitive/AnalysisManager.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
+#include "clang/Checker/LocalCheckers.h"
+#include "clang/Checker/ManagerRegistry.h"
+#include "clang/Checker/PathDiagnostic.h"
+#include "clang/Checker/PathSensitive/AnalysisManager.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/PathDiagnosticClients.h"
diff --git a/lib/Frontend/HTMLDiagnostics.cpp b/lib/Frontend/HTMLDiagnostics.cpp
index b163e26..b5975c2 100644
--- a/lib/Frontend/HTMLDiagnostics.cpp
+++ b/lib/Frontend/HTMLDiagnostics.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "clang/Frontend/PathDiagnosticClients.h"
-#include "clang/Analysis/PathDiagnostic.h"
+#include "clang/Checker/PathDiagnostic.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/Basic/SourceManager.h"
diff --git a/lib/Frontend/PlistDiagnostics.cpp b/lib/Frontend/PlistDiagnostics.cpp
index 98be869..3c204fb 100644
--- a/lib/Frontend/PlistDiagnostics.cpp
+++ b/lib/Frontend/PlistDiagnostics.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "clang/Frontend/PathDiagnosticClients.h"
-#include "clang/Analysis/PathDiagnostic.h"
+#include "clang/Checker/PathDiagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/Preprocessor.h"
diff --git a/lib/Makefile b/lib/Makefile
index d499ee5..538bf43 100755
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -9,7 +9,7 @@
LEVEL = ../../..
PARALLEL_DIRS = Headers Runtime Basic Lex Parse AST Sema CodeGen Analysis \
- Rewrite Frontend Index Driver
+ Checker Rewrite Frontend Index Driver
include $(LEVEL)/Makefile.common
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 6ff8b1d..0a7b7f0 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -14,7 +14,7 @@
#include "Sema.h"
#include "clang/Analysis/CFG.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Analysis/AnalysisContext.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/DeclObjC.h"
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 938c41e..876fcb3 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -14,7 +14,7 @@
#include "Sema.h"
#include "SemaInit.h"
#include "Lookup.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Analysis/AnalysisContext.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 50976f7..e55fbe3 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -14,7 +14,7 @@
#include "Sema.h"
#include "SemaInit.h"
#include "Lookup.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Analysis/AnalysisContext.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"