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/include/clang/Analysis/Analyses/UninitializedValues.h b/include/clang/Analysis/Analyses/UninitializedValues.h
index 2b367b7..cd771ac 100644
--- a/include/clang/Analysis/Analyses/UninitializedValues.h
+++ b/include/clang/Analysis/Analyses/UninitializedValues.h
@@ -70,5 +70,8 @@
void InitializeValues(const CFG& cfg);
};
+
+void CheckUninitializedValues(CFG& cfg, ASTContext& Ctx, Diagnostic& Diags,
+ bool FullUninitTaint=false);
} // end namespace clang
#endif
diff --git a/include/clang/Analysis/PathSensitive/AnalysisContext.h b/include/clang/Analysis/PathSensitive/AnalysisContext.h
deleted file mode 100644
index c82bb96..0000000
--- a/include/clang/Analysis/PathSensitive/AnalysisContext.h
+++ /dev/null
@@ -1,277 +0,0 @@
-//=== AnalysisContext.h - Analysis context for Path Sens analysis --*- C++ -*-//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines AnalysisContext, a class that manages the analysis context
-// data for path sensitive analysis.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_ANALYSIS_ANALYSISCONTEXT_H
-#define LLVM_CLANG_ANALYSIS_ANALYSISCONTEXT_H
-
-#include "clang/AST/Decl.h"
-#include "llvm/ADT/OwningPtr.h"
-#include "llvm/ADT/FoldingSet.h"
-#include "llvm/ADT/PointerUnion.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/Support/Allocator.h"
-
-namespace clang {
-
-class Decl;
-class Stmt;
-class CFG;
-class CFGBlock;
-class LiveVariables;
-class ParentMap;
-class ImplicitParamDecl;
-class LocationContextManager;
-class BlockDataRegion;
-class StackFrameContext;
-
-/// AnalysisContext contains the context data for the function or method under
-/// analysis.
-class AnalysisContext {
- const Decl *D;
-
- // AnalysisContext owns the following data.
- CFG *cfg;
- LiveVariables *liveness;
- ParentMap *PM;
- llvm::DenseMap<const BlockDecl*,void*> *ReferencedBlockVars;
- llvm::BumpPtrAllocator A;
- bool AddEHEdges;
-public:
- AnalysisContext(const Decl *d, bool addehedges = false)
- : D(d), cfg(0), liveness(0), PM(0), ReferencedBlockVars(0),
- AddEHEdges(addehedges) {}
-
- ~AnalysisContext();
-
- ASTContext &getASTContext() { return D->getASTContext(); }
- const Decl *getDecl() { return D; }
- /// getAddEHEdges - Return true iff we are adding exceptional edges from
- /// callExprs. If this is false, then try/catch statements and blocks
- /// reachable from them can appear to be dead in the CFG, analysis passes must
- /// cope with that.
- bool getAddEHEdges() const { return AddEHEdges; }
- Stmt *getBody();
- CFG *getCFG();
- ParentMap &getParentMap();
- LiveVariables *getLiveVariables();
-
- typedef const VarDecl * const * referenced_decls_iterator;
-
- std::pair<referenced_decls_iterator, referenced_decls_iterator>
- getReferencedBlockVars(const BlockDecl *BD);
-
- /// Return the ImplicitParamDecl* associated with 'self' if this
- /// AnalysisContext wraps an ObjCMethodDecl. Returns NULL otherwise.
- const ImplicitParamDecl *getSelfDecl() const;
-};
-
-class AnalysisContextManager {
- typedef llvm::DenseMap<const Decl*, AnalysisContext*> ContextMap;
- ContextMap Contexts;
-public:
- ~AnalysisContextManager();
-
- AnalysisContext *getContext(const Decl *D);
-
- // Discard all previously created AnalysisContexts.
- void clear();
-};
-
-class LocationContext : public llvm::FoldingSetNode {
-public:
- enum ContextKind { StackFrame, Scope, Block };
-
-private:
- ContextKind Kind;
- AnalysisContext *Ctx;
- const LocationContext *Parent;
-
-protected:
- LocationContext(ContextKind k, AnalysisContext *ctx,
- const LocationContext *parent)
- : Kind(k), Ctx(ctx), Parent(parent) {}
-
-public:
- virtual ~LocationContext();
-
- ContextKind getKind() const { return Kind; }
-
- AnalysisContext *getAnalysisContext() const { return Ctx; }
-
- const LocationContext *getParent() const { return Parent; }
-
- const Decl *getDecl() const { return getAnalysisContext()->getDecl(); }
-
- CFG *getCFG() const { return getAnalysisContext()->getCFG(); }
-
- LiveVariables *getLiveVariables() const {
- return getAnalysisContext()->getLiveVariables();
- }
-
- ParentMap &getParentMap() const {
- return getAnalysisContext()->getParentMap();
- }
-
- const ImplicitParamDecl *getSelfDecl() const {
- return Ctx->getSelfDecl();
- }
-
- const StackFrameContext *getCurrentStackFrame() const;
- const StackFrameContext *
- getStackFrameForDeclContext(const DeclContext *DC) const;
-
- virtual void Profile(llvm::FoldingSetNodeID &ID) = 0;
-
- static bool classof(const LocationContext*) { return true; }
-
-public:
- static void ProfileCommon(llvm::FoldingSetNodeID &ID,
- ContextKind ck,
- AnalysisContext *ctx,
- const LocationContext *parent,
- const void* data);
-};
-
-class StackFrameContext : public LocationContext {
- // The callsite where this stack frame is established.
- const Stmt *CallSite;
-
- // The parent block of the callsite.
- const CFGBlock *Block;
-
- // The index of the callsite in the CFGBlock.
- unsigned Index;
-
- friend class LocationContextManager;
- StackFrameContext(AnalysisContext *ctx, const LocationContext *parent,
- const Stmt *s, const CFGBlock *blk, unsigned idx)
- : LocationContext(StackFrame, ctx, parent), CallSite(s), Block(blk),
- Index(idx) {}
-
-public:
- ~StackFrameContext() {}
-
- const Stmt *getCallSite() const { return CallSite; }
-
- const CFGBlock *getCallSiteBlock() const { return Block; }
-
- unsigned getIndex() const { return Index; }
-
- void Profile(llvm::FoldingSetNodeID &ID);
-
- static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
- const LocationContext *parent, const Stmt *s,
- const CFGBlock *blk, unsigned idx) {
- ProfileCommon(ID, StackFrame, ctx, parent, s);
- ID.AddPointer(blk);
- ID.AddInteger(idx);
- }
-
- static bool classof(const LocationContext* Ctx) {
- return Ctx->getKind() == StackFrame;
- }
-};
-
-class ScopeContext : public LocationContext {
- const Stmt *Enter;
-
- friend class LocationContextManager;
- ScopeContext(AnalysisContext *ctx, const LocationContext *parent,
- const Stmt *s)
- : LocationContext(Scope, ctx, parent), Enter(s) {}
-
-public:
- ~ScopeContext() {}
-
- void Profile(llvm::FoldingSetNodeID &ID);
-
- static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
- const LocationContext *parent, const Stmt *s) {
- ProfileCommon(ID, Scope, ctx, parent, s);
- }
-
- static bool classof(const LocationContext* Ctx) {
- return Ctx->getKind() == Scope;
- }
-};
-
-class BlockInvocationContext : public LocationContext {
- llvm::PointerUnion<const BlockDataRegion *, const BlockDecl *> Data;
-
- friend class LocationContextManager;
-
- BlockInvocationContext(AnalysisContext *ctx, const LocationContext *parent,
- const BlockDataRegion *br)
- : LocationContext(Block, ctx, parent), Data(br) {}
-
- BlockInvocationContext(AnalysisContext *ctx, const LocationContext *parent,
- const BlockDecl *bd)
- : LocationContext(Block, ctx, parent), Data(bd) {}
-
-public:
- ~BlockInvocationContext() {}
-
- const BlockDataRegion *getBlockRegion() const {
- return Data.is<const BlockDataRegion*>() ?
- Data.get<const BlockDataRegion*>() : 0;
- }
-
- const BlockDecl *getBlockDecl() const;
-
- void Profile(llvm::FoldingSetNodeID &ID);
-
- static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
- const LocationContext *parent, const BlockDataRegion *br){
- ProfileCommon(ID, Block, ctx, parent, br);
- }
-
- static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
- const LocationContext *parent, const BlockDecl *bd) {
- ProfileCommon(ID, Block, ctx, parent, bd);
- }
-
- static bool classof(const LocationContext* Ctx) {
- return Ctx->getKind() == Block;
- }
-};
-
-class LocationContextManager {
- llvm::FoldingSet<LocationContext> Contexts;
-public:
- ~LocationContextManager();
-
- const StackFrameContext *getStackFrame(AnalysisContext *ctx,
- const LocationContext *parent,
- const Stmt *s, const CFGBlock *blk,
- unsigned idx);
-
- const ScopeContext *getScope(AnalysisContext *ctx,
- const LocationContext *parent,
- const Stmt *s);
-
- const BlockInvocationContext *
- getBlockInvocation(AnalysisContext *ctx, const LocationContext *parent,
- const BlockDataRegion *BR);
-
- /// Discard all previously created LocationContext objects.
- void clear();
-private:
- template <typename LOC, typename DATA>
- const LOC *getLocationContext(AnalysisContext *ctx,
- const LocationContext *parent,
- const DATA *d);
-};
-
-} // end clang namespace
-#endif
diff --git a/include/clang/Analysis/LocalCheckers.h b/include/clang/Checker/LocalCheckers.h
similarity index 92%
rename from include/clang/Analysis/LocalCheckers.h
rename to include/clang/Checker/LocalCheckers.h
index 9c343e0..b179c8e 100644
--- a/include/clang/Analysis/LocalCheckers.h
+++ b/include/clang/Checker/LocalCheckers.h
@@ -35,9 +35,6 @@
void CheckDeadStores(CFG &cfg, LiveVariables &L, ParentMap &map,
BugReporter& BR);
-void CheckUninitializedValues(CFG& cfg, ASTContext& Ctx, Diagnostic& Diags,
- bool FullUninitTaint=false);
-
GRTransferFuncs* MakeCFRefCountTF(ASTContext& Ctx, bool GCEnabled,
const LangOptions& lopts);
diff --git a/include/clang/Analysis/ManagerRegistry.h b/include/clang/Checker/ManagerRegistry.h
similarity index 96%
rename from include/clang/Analysis/ManagerRegistry.h
rename to include/clang/Checker/ManagerRegistry.h
index 9729938..ebfd28e 100644
--- a/include/clang/Analysis/ManagerRegistry.h
+++ b/include/clang/Checker/ManagerRegistry.h
@@ -14,7 +14,7 @@
#ifndef LLVM_CLANG_ANALYSIS_MANAGER_REGISTRY_H
#define LLVM_CLANG_ANALYSIS_MANAGER_REGISTRY_H
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRState.h"
namespace clang {
diff --git a/include/clang/Analysis/PathDiagnostic.h b/include/clang/Checker/PathDiagnostic.h
similarity index 100%
rename from include/clang/Analysis/PathDiagnostic.h
rename to include/clang/Checker/PathDiagnostic.h
diff --git a/include/clang/Analysis/PathSensitive/AnalysisManager.h b/include/clang/Checker/PathSensitive/AnalysisManager.h
similarity index 96%
rename from include/clang/Analysis/PathSensitive/AnalysisManager.h
rename to include/clang/Checker/PathSensitive/AnalysisManager.h
index 8288864..f9bd7ae 100644
--- a/include/clang/Analysis/PathSensitive/AnalysisManager.h
+++ b/include/clang/Checker/PathSensitive/AnalysisManager.h
@@ -15,9 +15,9 @@
#ifndef LLVM_CLANG_ANALYSIS_ANALYSISMANAGER_H
#define LLVM_CLANG_ANALYSIS_ANALYSISMANAGER_H
-#include "clang/Analysis/PathSensitive/BugReporter.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
-#include "clang/Analysis/PathDiagnostic.h"
+#include "clang/Analysis/AnalysisContext.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathDiagnostic.h"
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/BasicValueFactory.h b/include/clang/Checker/PathSensitive/BasicValueFactory.h
similarity index 98%
rename from include/clang/Analysis/PathSensitive/BasicValueFactory.h
rename to include/clang/Checker/PathSensitive/BasicValueFactory.h
index 12f0ce2..1717c26 100644
--- a/include/clang/Analysis/PathSensitive/BasicValueFactory.h
+++ b/include/clang/Checker/PathSensitive/BasicValueFactory.h
@@ -16,8 +16,8 @@
#ifndef LLVM_CLANG_ANALYSIS_BASICVALUEFACTORY_H
#define LLVM_CLANG_ANALYSIS_BASICVALUEFACTORY_H
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
-#include "clang/Analysis/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/SVals.h"
#include "clang/AST/ASTContext.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/APSInt.h"
diff --git a/include/clang/Analysis/PathSensitive/BugReporter.h b/include/clang/Checker/PathSensitive/BugReporter.h
similarity index 98%
rename from include/clang/Analysis/PathSensitive/BugReporter.h
rename to include/clang/Checker/PathSensitive/BugReporter.h
index 6f6681a..2e88d8e 100644
--- a/include/clang/Analysis/PathSensitive/BugReporter.h
+++ b/include/clang/Checker/PathSensitive/BugReporter.h
@@ -17,9 +17,9 @@
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceLocation.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/ExplodedGraph.h"
-#include "clang/Analysis/PathSensitive/BugType.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/ExplodedGraph.h"
+#include "clang/Checker/PathSensitive/BugType.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallString.h"
diff --git a/include/clang/Analysis/PathSensitive/BugType.h b/include/clang/Checker/PathSensitive/BugType.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/BugType.h
rename to include/clang/Checker/PathSensitive/BugType.h
index b75a818..db7a99f 100644
--- a/include/clang/Analysis/PathSensitive/BugType.h
+++ b/include/clang/Checker/PathSensitive/BugType.h
@@ -14,7 +14,7 @@
#ifndef LLVM_CLANG_ANALYSIS_BUGTYPE
#define LLVM_CLANG_ANALYSIS_BUGTYPE
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include <llvm/ADT/FoldingSet.h>
#include <string>
diff --git a/include/clang/Analysis/PathSensitive/Checker.h b/include/clang/Checker/PathSensitive/Checker.h
similarity index 98%
rename from include/clang/Analysis/PathSensitive/Checker.h
rename to include/clang/Checker/PathSensitive/Checker.h
index 924a8b1..d498044 100644
--- a/include/clang/Analysis/PathSensitive/Checker.h
+++ b/include/clang/Checker/PathSensitive/Checker.h
@@ -15,9 +15,9 @@
#ifndef LLVM_CLANG_ANALYSIS_CHECKER
#define LLVM_CLANG_ANALYSIS_CHECKER
#include "clang/Analysis/Support/SaveAndRestore.h"
-#include "clang/Analysis/PathSensitive/GRCoreEngine.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRCoreEngine.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/StmtCXX.h"
diff --git a/include/clang/Analysis/PathSensitive/CheckerVisitor.def b/include/clang/Checker/PathSensitive/CheckerVisitor.def
similarity index 100%
rename from include/clang/Analysis/PathSensitive/CheckerVisitor.def
rename to include/clang/Checker/PathSensitive/CheckerVisitor.def
diff --git a/include/clang/Analysis/PathSensitive/CheckerVisitor.h b/include/clang/Checker/PathSensitive/CheckerVisitor.h
similarity index 91%
rename from include/clang/Analysis/PathSensitive/CheckerVisitor.h
rename to include/clang/Checker/PathSensitive/CheckerVisitor.h
index 37ec8de..913a6c7 100644
--- a/include/clang/Analysis/PathSensitive/CheckerVisitor.h
+++ b/include/clang/Checker/PathSensitive/CheckerVisitor.h
@@ -13,7 +13,7 @@
#ifndef LLVM_CLANG_ANALYSIS_CHECKERVISITOR
#define LLVM_CLANG_ANALYSIS_CHECKERVISITOR
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
namespace clang {
@@ -57,7 +57,7 @@
case Stmt::NAME ## Class:\
static_cast<ImplClass*>(this)->PreVisit ## NAME(C,static_cast<const NAME*>(S));\
break;
-#include "clang/Analysis/PathSensitive/CheckerVisitor.def"
+#include "clang/Checker/PathSensitive/CheckerVisitor.def"
}
}
@@ -76,7 +76,7 @@
static_cast<ImplClass*>(this)->\
PostVisit ## NAME(C,static_cast<const NAME*>(S));\
break;
-#include "clang/Analysis/PathSensitive/CheckerVisitor.def"
+#include "clang/Checker/PathSensitive/CheckerVisitor.def"
}
}
@@ -87,13 +87,13 @@
void PreVisit ## NAME(CheckerContext &C, const NAME* S) {\
PreVisit ## FALLBACK(C, S);\
}
-#include "clang/Analysis/PathSensitive/CheckerVisitor.def"
+#include "clang/Checker/PathSensitive/CheckerVisitor.def"
#define POSTVISIT(NAME, FALLBACK) \
void PostVisit ## NAME(CheckerContext &C, const NAME* S) {\
PostVisit ## FALLBACK(C, S);\
}
-#include "clang/Analysis/PathSensitive/CheckerVisitor.def"
+#include "clang/Checker/PathSensitive/CheckerVisitor.def"
};
} // end clang namespace
diff --git a/include/clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h b/include/clang/Checker/PathSensitive/Checkers/DereferenceChecker.h
similarity index 100%
rename from include/clang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
rename to include/clang/Checker/PathSensitive/Checkers/DereferenceChecker.h
diff --git a/include/clang/Analysis/PathSensitive/ConstraintManager.h b/include/clang/Checker/PathSensitive/ConstraintManager.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/ConstraintManager.h
rename to include/clang/Checker/PathSensitive/ConstraintManager.h
index c829280..ce7d1b3 100644
--- a/include/clang/Analysis/PathSensitive/ConstraintManager.h
+++ b/include/clang/Checker/PathSensitive/ConstraintManager.h
@@ -15,7 +15,7 @@
#define LLVM_CLANG_ANALYSIS_CONSTRAINT_MANAGER_H
// FIXME: Typedef LiveSymbolsTy/DeadSymbolsTy at a more appropriate place.
-#include "clang/Analysis/PathSensitive/Store.h"
+#include "clang/Checker/PathSensitive/Store.h"
namespace llvm {
class APSInt;
diff --git a/include/clang/Analysis/PathSensitive/Environment.h b/include/clang/Checker/PathSensitive/Environment.h
similarity index 96%
rename from include/clang/Analysis/PathSensitive/Environment.h
rename to include/clang/Checker/PathSensitive/Environment.h
index 6d5c567..0852c31 100644
--- a/include/clang/Analysis/PathSensitive/Environment.h
+++ b/include/clang/Checker/PathSensitive/Environment.h
@@ -16,11 +16,11 @@
// For using typedefs in StoreManager. Should find a better place for these
// typedefs.
-#include "clang/Analysis/PathSensitive/Store.h"
+#include "clang/Checker/PathSensitive/Store.h"
#include "llvm/ADT/ImmutableMap.h"
#include "llvm/ADT/SmallVector.h"
-#include "clang/Analysis/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/SVals.h"
#include "llvm/Support/Allocator.h"
#include "llvm/ADT/FoldingSet.h"
diff --git a/include/clang/Analysis/PathSensitive/ExplodedGraph.h b/include/clang/Checker/PathSensitive/ExplodedGraph.h
similarity index 99%
rename from include/clang/Analysis/PathSensitive/ExplodedGraph.h
rename to include/clang/Checker/PathSensitive/ExplodedGraph.h
index fb5e1b8..d6c4436 100644
--- a/include/clang/Analysis/PathSensitive/ExplodedGraph.h
+++ b/include/clang/Checker/PathSensitive/ExplodedGraph.h
@@ -16,7 +16,7 @@
#define LLVM_CLANG_ANALYSIS_EXPLODEDGRAPH
#include "clang/Analysis/ProgramPoint.h"
-#include "clang/Analysis/PathSensitive/AnalysisContext.h"
+#include "clang/Analysis/AnalysisContext.h"
#include "clang/AST/Decl.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/FoldingSet.h"
diff --git a/include/clang/Analysis/PathSensitive/GRAuditor.h b/include/clang/Checker/PathSensitive/GRAuditor.h
similarity index 100%
rename from include/clang/Analysis/PathSensitive/GRAuditor.h
rename to include/clang/Checker/PathSensitive/GRAuditor.h
diff --git a/include/clang/Analysis/PathSensitive/GRBlockCounter.h b/include/clang/Checker/PathSensitive/GRBlockCounter.h
similarity index 100%
rename from include/clang/Analysis/PathSensitive/GRBlockCounter.h
rename to include/clang/Checker/PathSensitive/GRBlockCounter.h
diff --git a/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/include/clang/Checker/PathSensitive/GRCoreEngine.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRCoreEngine.h
rename to include/clang/Checker/PathSensitive/GRCoreEngine.h
index 74f7a14..6da4581 100644
--- a/include/clang/Analysis/PathSensitive/GRCoreEngine.h
+++ b/include/clang/Checker/PathSensitive/GRCoreEngine.h
@@ -16,11 +16,11 @@
#define LLVM_CLANG_ANALYSIS_GRENGINE
#include "clang/AST/Expr.h"
-#include "clang/Analysis/PathSensitive/ExplodedGraph.h"
-#include "clang/Analysis/PathSensitive/GRWorkList.h"
-#include "clang/Analysis/PathSensitive/GRBlockCounter.h"
-#include "clang/Analysis/PathSensitive/GRAuditor.h"
-#include "clang/Analysis/PathSensitive/GRSubEngine.h"
+#include "clang/Checker/PathSensitive/ExplodedGraph.h"
+#include "clang/Checker/PathSensitive/GRWorkList.h"
+#include "clang/Checker/PathSensitive/GRBlockCounter.h"
+#include "clang/Checker/PathSensitive/GRAuditor.h"
+#include "clang/Checker/PathSensitive/GRSubEngine.h"
#include "llvm/ADT/OwningPtr.h"
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/GRExprEngine.h b/include/clang/Checker/PathSensitive/GRExprEngine.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRExprEngine.h
rename to include/clang/Checker/PathSensitive/GRExprEngine.h
index df90ad9..693d7cd 100644
--- a/include/clang/Analysis/PathSensitive/GRExprEngine.h
+++ b/include/clang/Checker/PathSensitive/GRExprEngine.h
@@ -16,13 +16,13 @@
#ifndef LLVM_CLANG_ANALYSIS_GREXPRENGINE
#define LLVM_CLANG_ANALYSIS_GREXPRENGINE
-#include "clang/Analysis/PathSensitive/AnalysisManager.h"
-#include "clang/Analysis/PathSensitive/GRSubEngine.h"
-#include "clang/Analysis/PathSensitive/GRCoreEngine.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
-#include "clang/Analysis/PathSensitive/GRSimpleAPICheck.h"
-#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
-#include "clang/Analysis/PathSensitive/BugReporter.h"
+#include "clang/Checker/PathSensitive/AnalysisManager.h"
+#include "clang/Checker/PathSensitive/GRSubEngine.h"
+#include "clang/Checker/PathSensitive/GRCoreEngine.h"
+#include "clang/Checker/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRSimpleAPICheck.h"
+#include "clang/Checker/PathSensitive/GRTransferFuncs.h"
+#include "clang/Checker/PathSensitive/BugReporter.h"
#include "clang/AST/Type.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ExprCXX.h"
diff --git a/include/clang/Analysis/PathSensitive/GRExprEngineBuilders.h b/include/clang/Checker/PathSensitive/GRExprEngineBuilders.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRExprEngineBuilders.h
rename to include/clang/Checker/PathSensitive/GRExprEngineBuilders.h
index 60db406..5503412 100644
--- a/include/clang/Analysis/PathSensitive/GRExprEngineBuilders.h
+++ b/include/clang/Checker/PathSensitive/GRExprEngineBuilders.h
@@ -14,7 +14,7 @@
#ifndef LLVM_CLANG_ANALYSIS_GREXPRENGINE_BUILDERS
#define LLVM_CLANG_ANALYSIS_GREXPRENGINE_BUILDERS
-#include "clang/Analysis/PathSensitive/GRExprEngine.h"
+#include "clang/Checker/PathSensitive/GRExprEngine.h"
#include "clang/Analysis/Support/SaveAndRestore.h"
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/GRSimpleAPICheck.h b/include/clang/Checker/PathSensitive/GRSimpleAPICheck.h
similarity index 90%
rename from include/clang/Analysis/PathSensitive/GRSimpleAPICheck.h
rename to include/clang/Checker/PathSensitive/GRSimpleAPICheck.h
index 978ff08..383463b 100644
--- a/include/clang/Analysis/PathSensitive/GRSimpleAPICheck.h
+++ b/include/clang/Checker/PathSensitive/GRSimpleAPICheck.h
@@ -16,8 +16,8 @@
#ifndef LLVM_CLANG_ANALYSIS_GRAPICHECKS
#define LLVM_CLANG_ANALYSIS_GRAPICHECKS
-#include "clang/Analysis/PathSensitive/GRAuditor.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRAuditor.h"
+#include "clang/Checker/PathSensitive/GRState.h"
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/GRState.h b/include/clang/Checker/PathSensitive/GRState.h
similarity index 98%
rename from include/clang/Analysis/PathSensitive/GRState.h
rename to include/clang/Checker/PathSensitive/GRState.h
index 11cdac0..947db6e 100644
--- a/include/clang/Analysis/PathSensitive/GRState.h
+++ b/include/clang/Checker/PathSensitive/GRState.h
@@ -16,11 +16,11 @@
// FIXME: Reduce the number of includes.
-#include "clang/Analysis/PathSensitive/Environment.h"
-#include "clang/Analysis/PathSensitive/Store.h"
-#include "clang/Analysis/PathSensitive/ConstraintManager.h"
-#include "clang/Analysis/PathSensitive/ValueManager.h"
-#include "clang/Analysis/PathSensitive/GRCoreEngine.h"
+#include "clang/Checker/PathSensitive/Environment.h"
+#include "clang/Checker/PathSensitive/Store.h"
+#include "clang/Checker/PathSensitive/ConstraintManager.h"
+#include "clang/Checker/PathSensitive/ValueManager.h"
+#include "clang/Checker/PathSensitive/GRCoreEngine.h"
#include "clang/AST/Expr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/ASTContext.h"
diff --git a/include/clang/Analysis/PathSensitive/GRStateTrait.h b/include/clang/Checker/PathSensitive/GRStateTrait.h
similarity index 100%
rename from include/clang/Analysis/PathSensitive/GRStateTrait.h
rename to include/clang/Checker/PathSensitive/GRStateTrait.h
diff --git a/include/clang/Analysis/PathSensitive/GRSubEngine.h b/include/clang/Checker/PathSensitive/GRSubEngine.h
similarity index 98%
rename from include/clang/Analysis/PathSensitive/GRSubEngine.h
rename to include/clang/Checker/PathSensitive/GRSubEngine.h
index 5b383fa..ce57c2c 100644
--- a/include/clang/Analysis/PathSensitive/GRSubEngine.h
+++ b/include/clang/Checker/PathSensitive/GRSubEngine.h
@@ -13,7 +13,7 @@
#ifndef LLVM_CLANG_ANALYSIS_GRSUBENGINE_H
#define LLVM_CLANG_ANALYSIS_GRSUBENGINE_H
-#include "clang/Analysis/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/SVals.h"
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/GRTransferFuncs.h b/include/clang/Checker/PathSensitive/GRTransferFuncs.h
similarity index 94%
rename from include/clang/Analysis/PathSensitive/GRTransferFuncs.h
rename to include/clang/Checker/PathSensitive/GRTransferFuncs.h
index b058460..04634ef 100644
--- a/include/clang/Analysis/PathSensitive/GRTransferFuncs.h
+++ b/include/clang/Checker/PathSensitive/GRTransferFuncs.h
@@ -15,9 +15,9 @@
#ifndef LLVM_CLANG_ANALYSIS_GRTF
#define LLVM_CLANG_ANALYSIS_GRTF
-#include "clang/Analysis/PathSensitive/SVals.h"
-#include "clang/Analysis/PathSensitive/GRCoreEngine.h"
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/GRCoreEngine.h"
+#include "clang/Checker/PathSensitive/GRState.h"
#include <vector>
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/GRWorkList.h b/include/clang/Checker/PathSensitive/GRWorkList.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRWorkList.h
rename to include/clang/Checker/PathSensitive/GRWorkList.h
index 857fa31..b8f90fa 100644
--- a/include/clang/Analysis/PathSensitive/GRWorkList.h
+++ b/include/clang/Checker/PathSensitive/GRWorkList.h
@@ -15,7 +15,7 @@
#ifndef LLVM_CLANG_ANALYSIS_GRWORKLIST
#define LLVM_CLANG_ANALYSIS_GRWORKLIST
-#include "clang/Analysis/PathSensitive/GRBlockCounter.h"
+#include "clang/Checker/PathSensitive/GRBlockCounter.h"
#include <cstddef>
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/MemRegion.h b/include/clang/Checker/PathSensitive/MemRegion.h
similarity index 99%
rename from include/clang/Analysis/PathSensitive/MemRegion.h
rename to include/clang/Checker/PathSensitive/MemRegion.h
index 3bcedbe..e1b21b1 100644
--- a/include/clang/Analysis/PathSensitive/MemRegion.h
+++ b/include/clang/Checker/PathSensitive/MemRegion.h
@@ -18,8 +18,8 @@
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
-#include "clang/Analysis/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/SVals.h"
#include "clang/AST/ASTContext.h"
#include "llvm/Support/Casting.h"
#include "llvm/ADT/FoldingSet.h"
diff --git a/include/clang/Analysis/PathSensitive/SVals.h b/include/clang/Checker/PathSensitive/SVals.h
similarity index 99%
rename from include/clang/Analysis/PathSensitive/SVals.h
rename to include/clang/Checker/PathSensitive/SVals.h
index 9206817..e04f8dc 100644
--- a/include/clang/Analysis/PathSensitive/SVals.h
+++ b/include/clang/Checker/PathSensitive/SVals.h
@@ -15,7 +15,7 @@
#ifndef LLVM_CLANG_ANALYSIS_RVALUE_H
#define LLVM_CLANG_ANALYSIS_RVALUE_H
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
#include "llvm/Support/Casting.h"
#include "llvm/ADT/ImmutableList.h"
diff --git a/include/clang/Analysis/PathSensitive/SValuator.h b/include/clang/Checker/PathSensitive/SValuator.h
similarity index 98%
rename from include/clang/Analysis/PathSensitive/SValuator.h
rename to include/clang/Checker/PathSensitive/SValuator.h
index 4a4b502..74abe67 100644
--- a/include/clang/Analysis/PathSensitive/SValuator.h
+++ b/include/clang/Checker/PathSensitive/SValuator.h
@@ -16,7 +16,7 @@
#define LLVM_CLANG_ANALYSIS_SVALUATOR
#include "clang/AST/Expr.h"
-#include "clang/Analysis/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/SVals.h"
namespace clang {
diff --git a/include/clang/Analysis/PathSensitive/Store.h b/include/clang/Checker/PathSensitive/Store.h
similarity index 97%
rename from include/clang/Analysis/PathSensitive/Store.h
rename to include/clang/Checker/PathSensitive/Store.h
index 5606df0..7966fed 100644
--- a/include/clang/Analysis/PathSensitive/Store.h
+++ b/include/clang/Checker/PathSensitive/Store.h
@@ -14,9 +14,9 @@
#ifndef LLVM_CLANG_ANALYSIS_STORE_H
#define LLVM_CLANG_ANALYSIS_STORE_H
-#include "clang/Analysis/PathSensitive/MemRegion.h"
-#include "clang/Analysis/PathSensitive/SVals.h"
-#include "clang/Analysis/PathSensitive/ValueManager.h"
+#include "clang/Checker/PathSensitive/MemRegion.h"
+#include "clang/Checker/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/ValueManager.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
diff --git a/include/clang/Analysis/PathSensitive/SymbolManager.h b/include/clang/Checker/PathSensitive/SymbolManager.h
similarity index 100%
rename from include/clang/Analysis/PathSensitive/SymbolManager.h
rename to include/clang/Checker/PathSensitive/SymbolManager.h
diff --git a/include/clang/Analysis/PathSensitive/ValueManager.h b/include/clang/Checker/PathSensitive/ValueManager.h
similarity index 95%
rename from include/clang/Analysis/PathSensitive/ValueManager.h
rename to include/clang/Checker/PathSensitive/ValueManager.h
index 9cec3c4..0141cef 100644
--- a/include/clang/Analysis/PathSensitive/ValueManager.h
+++ b/include/clang/Checker/PathSensitive/ValueManager.h
@@ -17,11 +17,11 @@
#define LLVM_CLANG_ANALYSIS_AGGREGATE_VALUE_MANAGER_H
#include "llvm/ADT/OwningPtr.h"
-#include "clang/Analysis/PathSensitive/MemRegion.h"
-#include "clang/Analysis/PathSensitive/SVals.h"
-#include "clang/Analysis/PathSensitive/BasicValueFactory.h"
-#include "clang/Analysis/PathSensitive/SymbolManager.h"
-#include "clang/Analysis/PathSensitive/SValuator.h"
+#include "clang/Checker/PathSensitive/MemRegion.h"
+#include "clang/Checker/PathSensitive/SVals.h"
+#include "clang/Checker/PathSensitive/BasicValueFactory.h"
+#include "clang/Checker/PathSensitive/SymbolManager.h"
+#include "clang/Checker/PathSensitive/SValuator.h"
namespace llvm { class BumpPtrAllocator; }
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"
diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
index 90fb09c..cfd9b68 100644
--- a/tools/driver/CMakeLists.txt
+++ b/tools/driver/CMakeLists.txt
@@ -4,6 +4,7 @@
clangDriver
clangFrontend
clangCodeGen
+ clangChecker
clangAnalysis
clangRewrite
clangSema
diff --git a/tools/driver/Makefile b/tools/driver/Makefile
index b86a530..6610e1f 100644
--- a/tools/driver/Makefile
+++ b/tools/driver/Makefile
@@ -23,9 +23,9 @@
include $(LEVEL)/Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader bitwriter codegen ipo selectiondag
-USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangAnalysis.a \
- clangRewrite.a clangSema.a clangAST.a clangParse.a \
- clangLex.a clangBasic.a
+USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangChecker.a\
+ clangAnalysis.a clangRewrite.a clangSema.a clangAST.a\
+ clangParse.a clangLex.a clangBasic.a
include $(LLVM_SRC_ROOT)/Makefile.rules