From 1309f9a3b225ea846e5822691c39a77423125505 Mon Sep 17 00:00:00 2001
From: Ted Kremenek <kremenek@apple.com>
Date: Mon, 25 Jan 2010 04:41:41 +0000
Subject: [PATCH] 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
---
 .../Analysis/Analyses/UninitializedValues.h   |   3 +
 .../Analysis/PathSensitive/AnalysisContext.h  | 277 ------------------
 .../{Analysis => Checker}/LocalCheckers.h     |   3 -
 .../{Analysis => Checker}/ManagerRegistry.h   |   2 +-
 .../{Analysis => Checker}/PathDiagnostic.h    |   0
 .../PathSensitive/AnalysisManager.h           |   6 +-
 .../PathSensitive/BasicValueFactory.h         |   4 +-
 .../PathSensitive/BugReporter.h               |   6 +-
 .../PathSensitive/BugType.h                   |   2 +-
 .../PathSensitive/Checker.h                   |   6 +-
 .../PathSensitive/CheckerVisitor.def          |   0
 .../PathSensitive/CheckerVisitor.h            |  10 +-
 .../Checkers/DereferenceChecker.h             |   0
 .../PathSensitive/ConstraintManager.h         |   2 +-
 .../PathSensitive/Environment.h               |   4 +-
 .../PathSensitive/ExplodedGraph.h             |   2 +-
 .../PathSensitive/GRAuditor.h                 |   0
 .../PathSensitive/GRBlockCounter.h            |   0
 .../PathSensitive/GRCoreEngine.h              |  10 +-
 .../PathSensitive/GRExprEngine.h              |  14 +-
 .../PathSensitive/GRExprEngineBuilders.h      |   2 +-
 .../PathSensitive/GRSimpleAPICheck.h          |   4 +-
 .../PathSensitive/GRState.h                   |  10 +-
 .../PathSensitive/GRStateTrait.h              |   0
 .../PathSensitive/GRSubEngine.h               |   2 +-
 .../PathSensitive/GRTransferFuncs.h           |   6 +-
 .../PathSensitive/GRWorkList.h                |   2 +-
 .../PathSensitive/MemRegion.h                 |   4 +-
 .../PathSensitive/SVals.h                     |   2 +-
 .../PathSensitive/SValuator.h                 |   2 +-
 .../PathSensitive/Store.h                     |   6 +-
 .../PathSensitive/SymbolManager.h             |   0
 .../PathSensitive/ValueManager.h              |  10 +-
 lib/Analysis/AnalysisContext.cpp              |  26 +-
 lib/Analysis/CMakeLists.txt                   |  58 ----
 lib/Analysis/LiveVariables.cpp                |   2 +-
 lib/Analysis/UninitializedValues.cpp          |   1 -
 lib/CMakeLists.txt                            |   1 +
 .../ArrayBoundChecker.cpp                     |   6 +-
 .../AttrNonNullChecker.cpp                    |   4 +-
 .../BasicConstraintManager.cpp                |   6 +-
 .../BasicObjCFoundationChecks.cpp             |  18 +-
 .../BasicObjCFoundationChecks.h               |   0
 lib/{Analysis => Checker}/BasicStore.cpp      |   4 +-
 .../BasicValueFactory.cpp                     |   2 +-
 lib/{Analysis => Checker}/BugReporter.cpp     |   6 +-
 .../BugReporterVisitors.cpp                   |   6 +-
 .../BuiltinFunctionChecker.cpp                |   2 +-
 lib/{Analysis => Checker}/CFRefCount.cpp      |  18 +-
 lib/Checker/CMakeLists.txt                    |  62 ++++
 .../CallAndMessageChecker.cpp                 |   4 +-
 lib/{Analysis => Checker}/CallInliner.cpp     |   6 +-
 .../CastToStructChecker.cpp                   |   2 +-
 lib/{Analysis => Checker}/CheckDeadStores.cpp |   6 +-
 .../CheckObjCDealloc.cpp                      |   6 +-
 .../CheckObjCInstMethSignature.cpp            |   6 +-
 .../CheckObjCUnusedIVars.cpp                  |   6 +-
 .../CheckSecuritySyntaxOnly.cpp               |   4 +-
 .../CheckSizeofPointer.cpp                    |   4 +-
 lib/{Analysis => Checker}/Checker.cpp         |   2 +-
 .../DereferenceChecker.cpp                    |   8 +-
 lib/{Analysis => Checker}/DivZeroChecker.cpp  |   2 +-
 lib/{Analysis => Checker}/Environment.cpp     |   2 +-
 lib/{Analysis => Checker}/ExplodedGraph.cpp   |   4 +-
 .../FixedAddressChecker.cpp                   |   2 +-
 lib/{Analysis => Checker}/GRBlockCounter.cpp  |   2 +-
 lib/{Analysis => Checker}/GRCoreEngine.cpp    |   4 +-
 lib/{Analysis => Checker}/GRExprEngine.cpp    |   6 +-
 .../GRExprEngineExperimentalChecks.cpp        |   2 +-
 .../GRExprEngineExperimentalChecks.h          |   0
 .../GRExprEngineInternalChecks.h              |   0
 lib/{Analysis => Checker}/GRState.cpp         |   6 +-
 lib/{Analysis => Checker}/MallocChecker.cpp   |   8 +-
 lib/{Analysis => Checker}/ManagerRegistry.cpp |   2 +-
 lib/{Analysis => Checker}/MemRegion.cpp       |   7 +-
 .../NSAutoreleasePoolChecker.cpp              |   6 +-
 lib/{Analysis => Checker}/NSErrorChecker.cpp  |   8 +-
 .../NoReturnFunctionChecker.cpp               |   2 +-
 lib/{Analysis => Checker}/OSAtomicChecker.cpp |   2 +-
 lib/{Analysis => Checker}/PathDiagnostic.cpp  |   2 +-
 .../PointerArithChecker.cpp                   |   2 +-
 .../PointerSubChecker.cpp                     |   2 +-
 .../PthreadLockChecker.cpp                    |   6 +-
 .../RangeConstraintManager.cpp                |   8 +-
 lib/{Analysis => Checker}/RegionStore.cpp     |   8 +-
 .../ReturnPointerRangeChecker.cpp             |   6 +-
 .../ReturnStackAddressChecker.cpp             |   6 +-
 .../ReturnUndefChecker.cpp                    |   6 +-
 lib/{Analysis => Checker}/SVals.cpp           |   2 +-
 lib/{Analysis => Checker}/SValuator.cpp       |   4 +-
 .../SimpleConstraintManager.cpp               |   6 +-
 .../SimpleConstraintManager.h                 |   4 +-
 lib/{Analysis => Checker}/SimpleSValuator.cpp |   4 +-
 lib/{Analysis => Checker}/Store.cpp           |   4 +-
 lib/{Analysis => Checker}/SymbolManager.cpp   |   4 +-
 .../UndefBranchChecker.cpp                    |   2 +-
 .../UndefResultChecker.cpp                    |   6 +-
 .../UndefinedArraySubscriptChecker.cpp        |   4 +-
 .../UndefinedAssignmentChecker.cpp            |   4 +-
 lib/{Analysis => Checker}/VLASizeChecker.cpp  |   6 +-
 lib/{Analysis => Checker}/ValueManager.cpp    |   4 +-
 lib/Frontend/AnalysisConsumer.cpp             |  15 +-
 lib/Frontend/HTMLDiagnostics.cpp              |   2 +-
 lib/Frontend/PlistDiagnostics.cpp             |   2 +-
 lib/Makefile                                  |   2 +-
 lib/Sema/SemaChecking.cpp                     |   2 +-
 lib/Sema/SemaDecl.cpp                         |   2 +-
 lib/Sema/SemaExpr.cpp                         |   2 +-
 tools/driver/CMakeLists.txt                   |   1 +
 tools/driver/Makefile                         |   6 +-
 110 files changed, 292 insertions(+), 584 deletions(-)
 delete mode 100644 include/clang/Analysis/PathSensitive/AnalysisContext.h
 rename include/clang/{Analysis => Checker}/LocalCheckers.h (93%)
 rename include/clang/{Analysis => Checker}/ManagerRegistry.h (97%)
 rename include/clang/{Analysis => Checker}/PathDiagnostic.h (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/AnalysisManager.h (96%)
 rename include/clang/{Analysis => Checker}/PathSensitive/BasicValueFactory.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/BugReporter.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/BugType.h (97%)
 rename include/clang/{Analysis => Checker}/PathSensitive/Checker.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/CheckerVisitor.def (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/CheckerVisitor.h (91%)
 rename include/clang/{Analysis => Checker}/PathSensitive/Checkers/DereferenceChecker.h (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/ConstraintManager.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/Environment.h (96%)
 rename include/clang/{Analysis => Checker}/PathSensitive/ExplodedGraph.h (99%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRAuditor.h (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRBlockCounter.h (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRCoreEngine.h (97%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRExprEngine.h (97%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRExprEngineBuilders.h (97%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRSimpleAPICheck.h (90%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRState.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRStateTrait.h (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRSubEngine.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRTransferFuncs.h (94%)
 rename include/clang/{Analysis => Checker}/PathSensitive/GRWorkList.h (97%)
 rename include/clang/{Analysis => Checker}/PathSensitive/MemRegion.h (99%)
 rename include/clang/{Analysis => Checker}/PathSensitive/SVals.h (99%)
 rename include/clang/{Analysis => Checker}/PathSensitive/SValuator.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/Store.h (98%)
 rename include/clang/{Analysis => Checker}/PathSensitive/SymbolManager.h (100%)
 rename include/clang/{Analysis => Checker}/PathSensitive/ValueManager.h (96%)
 rename lib/{Analysis => Checker}/ArrayBoundChecker.cpp (94%)
 rename lib/{Analysis => Checker}/AttrNonNullChecker.cpp (96%)
 rename lib/{Analysis => Checker}/BasicConstraintManager.cpp (98%)
 rename lib/{Analysis => Checker}/BasicObjCFoundationChecks.cpp (97%)
 rename lib/{Analysis => Checker}/BasicObjCFoundationChecks.h (100%)
 rename lib/{Analysis => Checker}/BasicStore.cpp (99%)
 rename lib/{Analysis => Checker}/BasicValueFactory.cpp (99%)
 rename lib/{Analysis => Checker}/BugReporter.cpp (99%)
 rename lib/{Analysis => Checker}/BugReporterVisitors.cpp (98%)
 rename lib/{Analysis => Checker}/BuiltinFunctionChecker.cpp (97%)
 rename lib/{Analysis => Checker}/CFRefCount.cpp (99%)
 create mode 100644 lib/Checker/CMakeLists.txt
 rename lib/{Analysis => Checker}/CallAndMessageChecker.cpp (98%)
 rename lib/{Analysis => Checker}/CallInliner.cpp (95%)
 rename lib/{Analysis => Checker}/CastToStructChecker.cpp (97%)
 rename lib/{Analysis => Checker}/CheckDeadStores.cpp (98%)
 rename lib/{Analysis => Checker}/CheckObjCDealloc.cpp (98%)
 rename lib/{Analysis => Checker}/CheckObjCInstMethSignature.cpp (96%)
 rename lib/{Analysis => Checker}/CheckObjCUnusedIVars.cpp (97%)
 rename lib/{Analysis => Checker}/CheckSecuritySyntaxOnly.cpp (99%)
 rename lib/{Analysis => Checker}/CheckSizeofPointer.cpp (95%)
 rename lib/{Analysis => Checker}/Checker.cpp (95%)
 rename lib/{Analysis => Checker}/DereferenceChecker.cpp (95%)
 rename lib/{Analysis => Checker}/DivZeroChecker.cpp (97%)
 rename lib/{Analysis => Checker}/Environment.cpp (99%)
 rename lib/{Analysis => Checker}/ExplodedGraph.cpp (98%)
 rename lib/{Analysis => Checker}/FixedAddressChecker.cpp (97%)
 rename lib/{Analysis => Checker}/GRBlockCounter.cpp (96%)
 rename lib/{Analysis => Checker}/GRCoreEngine.cpp (99%)
 rename lib/{Analysis => Checker}/GRExprEngine.cpp (99%)
 rename lib/{Analysis => Checker}/GRExprEngineExperimentalChecks.cpp (96%)
 rename lib/{Analysis => Checker}/GRExprEngineExperimentalChecks.h (100%)
 rename lib/{Analysis => Checker}/GRExprEngineInternalChecks.h (100%)
 rename lib/{Analysis => Checker}/GRState.cpp (98%)
 rename lib/{Analysis => Checker}/MallocChecker.cpp (98%)
 rename lib/{Analysis => Checker}/ManagerRegistry.cpp (93%)
 rename lib/{Analysis => Checker}/MemRegion.cpp (99%)
 rename lib/{Analysis => Checker}/NSAutoreleasePoolChecker.cpp (94%)
 rename lib/{Analysis => Checker}/NSErrorChecker.cpp (97%)
 rename lib/{Analysis => Checker}/NoReturnFunctionChecker.cpp (98%)
 rename lib/{Analysis => Checker}/OSAtomicChecker.cpp (99%)
 rename lib/{Analysis => Checker}/PathDiagnostic.cpp (99%)
 rename lib/{Analysis => Checker}/PointerArithChecker.cpp (97%)
 rename lib/{Analysis => Checker}/PointerSubChecker.cpp (97%)
 rename lib/{Analysis => Checker}/PthreadLockChecker.cpp (96%)
 rename lib/{Analysis => Checker}/RangeConstraintManager.cpp (98%)
 rename lib/{Analysis => Checker}/RegionStore.cpp (99%)
 rename lib/{Analysis => Checker}/ReturnPointerRangeChecker.cpp (94%)
 rename lib/{Analysis => Checker}/ReturnStackAddressChecker.cpp (95%)
 rename lib/{Analysis => Checker}/ReturnUndefChecker.cpp (91%)
 rename lib/{Analysis => Checker}/SVals.cpp (99%)
 rename lib/{Analysis => Checker}/SValuator.cpp (98%)
 rename lib/{Analysis => Checker}/SimpleConstraintManager.cpp (98%)
 rename lib/{Analysis => Checker}/SimpleConstraintManager.h (96%)
 rename lib/{Analysis => Checker}/SimpleSValuator.cpp (99%)
 rename lib/{Analysis => Checker}/Store.cpp (98%)
 rename lib/{Analysis => Checker}/SymbolManager.cpp (98%)
 rename lib/{Analysis => Checker}/UndefBranchChecker.cpp (98%)
 rename lib/{Analysis => Checker}/UndefResultChecker.cpp (94%)
 rename lib/{Analysis => Checker}/UndefinedArraySubscriptChecker.cpp (94%)
 rename lib/{Analysis => Checker}/UndefinedAssignmentChecker.cpp (95%)
 rename lib/{Analysis => Checker}/VLASizeChecker.cpp (94%)
 rename lib/{Analysis => Checker}/ValueManager.cpp (97%)

diff --git a/include/clang/Analysis/Analyses/UninitializedValues.h b/include/clang/Analysis/Analyses/UninitializedValues.h
index 2b367b7e37f..cd771acb06a 100644
--- a/include/clang/Analysis/Analyses/UninitializedValues.h
+++ b/include/clang/Analysis/Analyses/UninitializedValues.h
@@ -70,5 +70,8 @@ public:
   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 c82bb962fd1..00000000000
--- 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 93%
rename from include/clang/Analysis/LocalCheckers.h
rename to include/clang/Checker/LocalCheckers.h
index 9c343e07864..b179c8eb6ca 100644
--- a/include/clang/Analysis/LocalCheckers.h
+++ b/include/clang/Checker/LocalCheckers.h
@@ -35,9 +35,6 @@ class GRExprEngine;
 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 97%
rename from include/clang/Analysis/ManagerRegistry.h
rename to include/clang/Checker/ManagerRegistry.h
index 972993855c2..ebfd28e1093 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 8288864f2b6..f9bd7aec05c 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 12f0ce2d50b..1717c268d34 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 6f6681a3629..2e88d8efad8 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 b75a8189e54..db7a99f0e77 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 924a8b11b09..d498044b82c 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 37ec8def50b..913a6c75bcc 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 @@ public:
 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 @@ case Stmt::NAME ## Class:\
 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 @@ break;
 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 98%
rename from include/clang/Analysis/PathSensitive/ConstraintManager.h
rename to include/clang/Checker/PathSensitive/ConstraintManager.h
index c8292802ae9..ce7d1b38171 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 6d5c5678e59..0852c31faeb 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 fb5e1b8a415..d6c4436c594 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 74f7a147b84..6da45815f99 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 df90ad9f7f0..693d7cdb4f1 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 60db406cd13..5503412f7e4 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 978ff0889e6..383463b822c 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 11cdac0e96d..947db6e46c5 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 5b383fae9bd..ce57c2c68b4 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 b058460a493..04634effd58 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 857fa316911..b8f90fa1eea 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 3bcedbefd65..e1b21b16e2d 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 9206817989d..e04f8dc999a 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 4a4b502c627..74abe679123 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 98%
rename from include/clang/Analysis/PathSensitive/Store.h
rename to include/clang/Checker/PathSensitive/Store.h
index 5606df0014f..7966fed5fb6 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 96%
rename from include/clang/Analysis/PathSensitive/ValueManager.h
rename to include/clang/Checker/PathSensitive/ValueManager.h
index 9cec3c421fb..0141cefb01c 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 ad9f6dd1941..0c64610bea4 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 @@ AnalysisContext *AnalysisContextManager::getContext(const Decl *D) {
   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 ScopeContext::Profile(llvm::FoldingSetNodeID &ID) {
 }
 
 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 @@ LocationContextManager::getScope(AnalysisContext *ctx,
   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 521f1be6ec8..0cadca5dc53 100644
--- a/lib/Analysis/CMakeLists.txt
+++ b/lib/Analysis/CMakeLists.txt
@@ -2,67 +2,9 @@ set(LLVM_NO_RTTI 1)
 
 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 0b2620e609c..94ed75286de 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 6fa4b539dc4..bdc0e7c621f 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 2bfaa445e56..bc2cd460d92 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -10,3 +10,4 @@ add_subdirectory(Rewrite)
 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 94%
rename from lib/Analysis/ArrayBoundChecker.cpp
rename to lib/Checker/ArrayBoundChecker.cpp
index 49c86068265..0c3e3e9df47 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 aa21700c248..c9e0e40af7b 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 6dfc470530a..e89546ecb01 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 97%
rename from lib/Analysis/BasicObjCFoundationChecks.cpp
rename to lib/Checker/BasicObjCFoundationChecks.cpp
index 67483d97929..f410767a66a 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 224281b1777..0c95940e031 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 99%
rename from lib/Analysis/BasicValueFactory.cpp
rename to lib/Checker/BasicValueFactory.cpp
index b33c277f86f..3b01e23da1e 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 2a9531df60f..1afb8c76c0b 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 87de30ae7ae..98261943a86 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 a89ad2164b3..8711492049c 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 5a15fbfb1f0..a128f9048d9 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 00000000000..a1cd99130ab
--- /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 c287354650b..c8739fdb5d8 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 d18bbcc0174..8d4596d85ea 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 219c09f6ab7..bef5bc285ee 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 6e4d8998620..91c9bb30adb 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 98%
rename from lib/Analysis/CheckObjCDealloc.cpp
rename to lib/Checker/CheckObjCDealloc.cpp
index 87c1f270a65..7888c7aa2fb 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 10ba896557d..67485c6480b 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 97%
rename from lib/Analysis/CheckObjCUnusedIVars.cpp
rename to lib/Checker/CheckObjCUnusedIVars.cpp
index d4067c900f3..27dc45f2f4b 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 f4874a5dfe4..3bf7a60202a 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 4f5da9f5a71..3f40235e0b3 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 fb9d04d947b..36323b9efb6 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 95%
rename from lib/Analysis/DereferenceChecker.cpp
rename to lib/Checker/DereferenceChecker.cpp
index 98243874d7d..623aed21438 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 266c2360942..e1346e11b6f 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 99%
rename from lib/Analysis/Environment.cpp
rename to lib/Checker/Environment.cpp
index f04cf7b05fe..c2c9190fc9f 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 3b339ffc0df..20429b95199 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 97%
rename from lib/Analysis/FixedAddressChecker.cpp
rename to lib/Checker/FixedAddressChecker.cpp
index 031ca44b602..04c17d6d7ab 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 4f4103ac45b..3fa3e1ebb9c 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 99%
rename from lib/Analysis/GRCoreEngine.cpp
rename to lib/Checker/GRCoreEngine.cpp
index 209452a3927..d54b0777eda 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 8f8d859e0ca..458c0f47369 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 33479b0cb7e..1e94c93a757 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 051d465f41b..2e952068fb0 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 98%
rename from lib/Analysis/MallocChecker.cpp
rename to lib/Checker/MallocChecker.cpp
index 28f4db78806..3be2e0299bb 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 8943db2a234..d11a997cc0f 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 99%
rename from lib/Analysis/MemRegion.cpp
rename to lib/Checker/MemRegion.cpp
index 87d60d34093..1e82883a68a 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 94%
rename from lib/Analysis/NSAutoreleasePoolChecker.cpp
rename to lib/Checker/NSAutoreleasePoolChecker.cpp
index 2ff04878f7a..c6530ec3ed9 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 97%
rename from lib/Analysis/NSErrorChecker.cpp
rename to lib/Checker/NSErrorChecker.cpp
index e3cf57fd0c1..dd20e7a8c04 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 98%
rename from lib/Analysis/NoReturnFunctionChecker.cpp
rename to lib/Checker/NoReturnFunctionChecker.cpp
index 5cfd9acd5f5..1455d87665d 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 99%
rename from lib/Analysis/OSAtomicChecker.cpp
rename to lib/Checker/OSAtomicChecker.cpp
index 9d34e9ec5c8..f84388a7556 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 734570a21e6..e95fcc2720a 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 370233ce38b..3d62d0c7b9d 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 c597a258075..acc848ac8ed 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 96%
rename from lib/Analysis/PthreadLockChecker.cpp
rename to lib/Checker/PthreadLockChecker.cpp
index e95095c7975..da1f7f30f27 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 98%
rename from lib/Analysis/RangeConstraintManager.cpp
rename to lib/Checker/RangeConstraintManager.cpp
index 2cf3dfb6d0d..c904c33e08d 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 a735ed94578..39686c22df6 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 b0350cb576f..0a19254528d 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 4d7e8ade98f..3f40bc34728 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 7cd71265805..7180bd53713 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 fbdb73b0ef2..efa5521ebd0 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 98%
rename from lib/Analysis/SValuator.cpp
rename to lib/Checker/SValuator.cpp
index 8392fcf65a2..66cd3193b14 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 98%
rename from lib/Analysis/SimpleConstraintManager.cpp
rename to lib/Checker/SimpleConstraintManager.cpp
index eca20d574db..8c423a99777 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 81823983194..5f20e0072b2 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 99%
rename from lib/Analysis/SimpleSValuator.cpp
rename to lib/Checker/SimpleSValuator.cpp
index 8f2f5a1b134..7c6e0902caf 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 1724a9250c2..98b86a9f46b 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 3fe36b064e3..40bdcf65bca 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 c739d1ac4b2..e047b187b10 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 94%
rename from lib/Analysis/UndefResultChecker.cpp
rename to lib/Checker/UndefResultChecker.cpp
index acc86dda5a9..4408c471d26 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 94%
rename from lib/Analysis/UndefinedArraySubscriptChecker.cpp
rename to lib/Checker/UndefinedArraySubscriptChecker.cpp
index d6aacaf1f85..b20154df333 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 95%
rename from lib/Analysis/UndefinedAssignmentChecker.cpp
rename to lib/Checker/UndefinedAssignmentChecker.cpp
index 4630b823a91..6edc3d8150a 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 2690d6f0cff..b41126c5e73 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 d09137330cb..5359489a229 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 45a3b15caec..d73114eaf24 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 b163e267b04..b5975c27dfb 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 98be869d264..3c204fb5f10 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 d499ee555a3..538bf439407 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 6ff8b1d7537..0a7b7f0911f 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 938c41efbe6..876fcb32bae 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 50976f7b704..e55fbe3d091 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 90fb09c0d9a..cfd9b689556 100644
--- a/tools/driver/CMakeLists.txt
+++ b/tools/driver/CMakeLists.txt
@@ -4,6 +4,7 @@ set( LLVM_USED_LIBS
   clangDriver
   clangFrontend
   clangCodeGen
+  clangChecker
   clangAnalysis
   clangRewrite
   clangSema
diff --git a/tools/driver/Makefile b/tools/driver/Makefile
index b86a5309beb..6610e1f68a4 100644
--- a/tools/driver/Makefile
+++ b/tools/driver/Makefile
@@ -23,9 +23,9 @@ TOOL_NO_EXPORTS = 1
 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
 
-- 
GitLab