]> granicus.if.org Git - clang/commitdiff
Split libAnalysis into two libraries: libAnalysis and libChecker.
authorTed Kremenek <kremenek@apple.com>
Mon, 25 Jan 2010 04:41:41 +0000 (04:41 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 25 Jan 2010 04:41:41 +0000 (04:41 +0000)
(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 2b367b7e37f679f19a2bb6028843eac696e831a9..cd771acb06a5db584fc9ab6b215cb2f581b8146b 100644 (file)
@@ -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 (file)
index c82bb96..0000000
+++ /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
similarity index 93%
rename from include/clang/Analysis/LocalCheckers.h
rename to include/clang/Checker/LocalCheckers.h
index 9c343e0786415db6ed0a12a3326c907dc6a4e2b2..b179c8eb6ca1e3cfd4e2843d1495a6d150a3e57e 100644 (file)
@@ -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);
 
similarity index 97%
rename from include/clang/Analysis/ManagerRegistry.h
rename to include/clang/Checker/ManagerRegistry.h
index 972993855c28ee594346350ea722ee9c7e76d201..ebfd28e109308534fdf80b9b5158e5c30f7fca74 100644 (file)
@@ -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 {
 
similarity index 96%
rename from include/clang/Analysis/PathSensitive/AnalysisManager.h
rename to include/clang/Checker/PathSensitive/AnalysisManager.h
index 8288864f2b6142d4e8acd2e2823d7f2bec28e91b..f9bd7aec05c4b10674c52c0cc71c5ad4fb146bf8 100644 (file)
@@ -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 {
 
similarity index 98%
rename from include/clang/Analysis/PathSensitive/BasicValueFactory.h
rename to include/clang/Checker/PathSensitive/BasicValueFactory.h
index 12f0ce2d50b7cb90b7b91ff31f439bc33713ce5a..1717c268d340ffba5e6d3d5c92cb3e2a779c8af7 100644 (file)
@@ -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"
similarity index 98%
rename from include/clang/Analysis/PathSensitive/BugReporter.h
rename to include/clang/Checker/PathSensitive/BugReporter.h
index 6f6681a3629becbddc1c3e424aa0b5854487cfb7..2e88d8efad80744721c50d9c1a70e0277e644c6d 100644 (file)
@@ -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"
similarity index 97%
rename from include/clang/Analysis/PathSensitive/BugType.h
rename to include/clang/Checker/PathSensitive/BugType.h
index b75a8189e54ca73b4b4c586a36f0b6dfbf619ad7..db7a99f0e77cd06519430a904a97ac4a9c5b8c53 100644 (file)
@@ -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>
 
similarity index 98%
rename from include/clang/Analysis/PathSensitive/Checker.h
rename to include/clang/Checker/PathSensitive/Checker.h
index 924a8b11b098de613afccd77d0e3b3cd38d69ae9..d498044b82ca73e2b0f8196cb34a4d0ed87dc2e4 100644 (file)
@@ -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"
similarity index 91%
rename from include/clang/Analysis/PathSensitive/CheckerVisitor.h
rename to include/clang/Checker/PathSensitive/CheckerVisitor.h
index 37ec8def50b35da5f246b0505cebc5f1e4f9738c..913a6c75bccb80f21cb986b57499b3fe35624ed7 100644 (file)
@@ -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
similarity index 98%
rename from include/clang/Analysis/PathSensitive/ConstraintManager.h
rename to include/clang/Checker/PathSensitive/ConstraintManager.h
index c8292802ae9d99a8c9fae3d161bd953542730376..ce7d1b381714e6f286cb1199c022896509fb84c3 100644 (file)
@@ -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;
similarity index 96%
rename from include/clang/Analysis/PathSensitive/Environment.h
rename to include/clang/Checker/PathSensitive/Environment.h
index 6d5c5678e59b1a2d84c07cba82aaf0f621db6fbb..0852c31faeb6f4e9678bfea757a3a557ef4e9ebc 100644 (file)
 
 // 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"
 
similarity index 99%
rename from include/clang/Analysis/PathSensitive/ExplodedGraph.h
rename to include/clang/Checker/PathSensitive/ExplodedGraph.h
index fb5e1b8a415fc27d61765d08e7a9bdebf55d0d47..d6c4436c594c35e1dc079f7dcb5c601883d1a7a6 100644 (file)
@@ -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"
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRCoreEngine.h
rename to include/clang/Checker/PathSensitive/GRCoreEngine.h
index 74f7a147b841f6173a279c1ec7f84f4b6ceda6c7..6da45815f99698b32f3a2a137acf9580453dee4a 100644 (file)
 #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 {
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRExprEngine.h
rename to include/clang/Checker/PathSensitive/GRExprEngine.h
index df90ad9f7f089801fbfcd0dc2c0f21143470f8fe..693d7cdb4f1c81191c3f0157181e89313aa791b8 100644 (file)
 #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"
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRExprEngineBuilders.h
rename to include/clang/Checker/PathSensitive/GRExprEngineBuilders.h
index 60db406cd13dfad47f5145dbbcf387573b23d58a..5503412f7e45661562c4c1088ea970dc02099895 100644 (file)
@@ -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 {
similarity index 90%
rename from include/clang/Analysis/PathSensitive/GRSimpleAPICheck.h
rename to include/clang/Checker/PathSensitive/GRSimpleAPICheck.h
index 978ff0889e64c54540856bcb7193bb664cb84c07..383463b822cb99b77efe7039c2a72a07a8460fd4 100644 (file)
@@ -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 {
 
similarity index 98%
rename from include/clang/Analysis/PathSensitive/GRState.h
rename to include/clang/Checker/PathSensitive/GRState.h
index 11cdac0e96de625df82041c544e5c54f88711e7b..947db6e46c50f3409f464340c388f50fd361efb1 100644 (file)
 
 // 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"
similarity index 98%
rename from include/clang/Analysis/PathSensitive/GRSubEngine.h
rename to include/clang/Checker/PathSensitive/GRSubEngine.h
index 5b383fae9bd08705ab7e14920a16046d81218659..ce57c2c68b4b2a95f1fff75ed5e8624d4e4521ec 100644 (file)
@@ -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 {
 
similarity index 94%
rename from include/clang/Analysis/PathSensitive/GRTransferFuncs.h
rename to include/clang/Checker/PathSensitive/GRTransferFuncs.h
index b058460a49343e27ad0e7032181b19fde62b1806..04634effd587805a05210d68d089a77aeb2149d5 100644 (file)
@@ -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 {
similarity index 97%
rename from include/clang/Analysis/PathSensitive/GRWorkList.h
rename to include/clang/Checker/PathSensitive/GRWorkList.h
index 857fa316911fcd044b1e734eba7fac719e719234..b8f90fa1eea17881adfbfc59c9b303299cee7c46 100644 (file)
@@ -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 {
similarity index 99%
rename from include/clang/Analysis/PathSensitive/MemRegion.h
rename to include/clang/Checker/PathSensitive/MemRegion.h
index 3bcedbefd65c1e29b7d17ee13a67355f3cbb28cd..e1b21b16e2d54ef623c1f610f1a3f09a080a2710 100644 (file)
@@ -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"
similarity index 99%
rename from include/clang/Analysis/PathSensitive/SVals.h
rename to include/clang/Checker/PathSensitive/SVals.h
index 9206817989db466932b210e788493258ade223e0..e04f8dc999a5a58a400bb3642b074adf9ea5285a 100644 (file)
@@ -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"
 
similarity index 98%
rename from include/clang/Analysis/PathSensitive/SValuator.h
rename to include/clang/Checker/PathSensitive/SValuator.h
index 4a4b502c6271333e5db990435f4acb073259f481..74abe6791237c9f033dfe880ffe65acd2ec6ce09 100644 (file)
@@ -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 {
 
similarity index 98%
rename from include/clang/Analysis/PathSensitive/Store.h
rename to include/clang/Checker/PathSensitive/Store.h
index 5606df0014f0ee500bbd4a9b1d1d826258b6caaf..7966fed5fb642e2128285cef83eb5d9be28fc28f 100644 (file)
@@ -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"
similarity index 96%
rename from include/clang/Analysis/PathSensitive/ValueManager.h
rename to include/clang/Checker/PathSensitive/ValueManager.h
index 9cec3c421fbea58ec1cf67cdb4a770d32a307f9b..0141cefb01c9100c47b7b6fcc1d921d388316aa2 100644 (file)
 #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; }
 
index ad9f6dd19413005e20f3a8079b238491ac3cf4d5..0c64610bea406921549431730540e51f3fc60a1b 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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.
 //===----------------------------------------------------------------------===//
index 521f1be6ec8ba340f49c82adfae5734f28381dda..0cadca5dc5393064d0f5414671a3e884df6f83c3 100644 (file)
@@ -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)
index 0b2620e609c2d89011015bd057ced43b096881fb..94ed75286dee2888a726ae199018e2d6e8ab6690 100644 (file)
@@ -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"
index 6fa4b539dc406b2b1f44526ddedfd1a0f0c6bf6e..bdc0e7c621f7fb6b5db47cb1b9b302c49f7ab619 100644 (file)
@@ -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"
index 2bfaa445e56868be2e6f79deed2277122c022544..bc2cd460d92b1bce734f6f6dfdf65547c6202991 100644 (file)
@@ -10,3 +10,4 @@ add_subdirectory(Rewrite)
 add_subdirectory(Driver)
 add_subdirectory(Frontend)
 add_subdirectory(Index)
+add_subdirectory(Checker)
similarity index 94%
rename from lib/Analysis/ArrayBoundChecker.cpp
rename to lib/Checker/ArrayBoundChecker.cpp
index 49c86068265b16bcaef817e9bb3818e94ae26a01..0c3e3e9df47da11e83b4ae4e25bec214fe54b7db 100644 (file)
@@ -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;
 
similarity index 96%
rename from lib/Analysis/AttrNonNullChecker.cpp
rename to lib/Checker/AttrNonNullChecker.cpp
index aa21700c248352ef547d9971ddda1557f53b4a38..c9e0e40af7b0a1486db350958b7d17ab8506f8c0 100644 (file)
@@ -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;
similarity index 98%
rename from lib/Analysis/BasicConstraintManager.cpp
rename to lib/Checker/BasicConstraintManager.cpp
index 6dfc470530a4e341dc773cb6b6e49e44c9ac72be..e89546ecb0185eec0932efc42896d82ce8a4ce9f 100644 (file)
@@ -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;
similarity index 97%
rename from lib/Analysis/BasicObjCFoundationChecks.cpp
rename to lib/Checker/BasicObjCFoundationChecks.cpp
index 67483d9792912cdc3d075b18e4b0c7c615c14f20..f410767a66a0873413128a1ebfca0515ad0ab4c1 100644 (file)
 
 #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"
similarity index 99%
rename from lib/Analysis/BasicStore.cpp
rename to lib/Checker/BasicStore.cpp
index 224281b177706e0c7ca070fe09272071f66c8dcd..0c95940e0319c6ee1eb2185787c58910ac2d1283 100644 (file)
@@ -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;
similarity index 99%
rename from lib/Analysis/BasicValueFactory.cpp
rename to lib/Checker/BasicValueFactory.cpp
index b33c277f86f90c9d68fba9db0798e2c671938b7b..3b01e23da1e7aaf69be984ee5c5c34203c6f8cf1 100644 (file)
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/BasicValueFactory.h"
+#include "clang/Checker/PathSensitive/BasicValueFactory.h"
 
 using namespace clang;
 
similarity index 99%
rename from lib/Analysis/BugReporter.cpp
rename to lib/Checker/BugReporter.cpp
index 2a9531df60f18f9f58ab541bcc67472543e229a0..1afb8c76c0bf1a3f253bff76d95e0be1dfff5b5e 100644 (file)
@@ -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"
similarity index 98%
rename from lib/Analysis/BugReporterVisitors.cpp
rename to lib/Checker/BugReporterVisitors.cpp
index 87de30ae7aecce4796a9e9fbb18a43b75f3cf70c..98261943a863e8e9dbc0519900034727f40a70e1 100644 (file)
@@ -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;
 
similarity index 97%
rename from lib/Analysis/BuiltinFunctionChecker.cpp
rename to lib/Checker/BuiltinFunctionChecker.cpp
index a89ad2164b30b761efefe260ce9e1bc8c338f990..8711492049c51c53a4d4caa5e30d44c72270903a 100644 (file)
@@ -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"
 
similarity index 99%
rename from lib/Analysis/CFRefCount.cpp
rename to lib/Checker/CFRefCount.cpp
index 5a15fbfb1f05f7ad9b1d4d56c149c355b8029db5..a128f9048d9b10ac2536ab2c261b0cb18d9b7d6a 100644 (file)
 
 #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 (file)
index 0000000..a1cd991
--- /dev/null
@@ -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
+  )
similarity index 98%
rename from lib/Analysis/CallAndMessageChecker.cpp
rename to lib/Checker/CallAndMessageChecker.cpp
index c287354650b82bf14e8158e2cf77fcd9858a744b..c8739fdb5d8fc8f45207c7258682efba45559131 100644 (file)
@@ -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"
 
similarity index 95%
rename from lib/Analysis/CallInliner.cpp
rename to lib/Checker/CallInliner.cpp
index d18bbcc0174ac46cc83a3ecad7feffdaa5dad3d9..8d4596d85ea0d91e25d245a95def8a434281dc74 100644 (file)
@@ -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;
 
similarity index 97%
rename from lib/Analysis/CastToStructChecker.cpp
rename to lib/Checker/CastToStructChecker.cpp
index 219c09f6ab7a2c0d05207bc76f30da6b43b3042f..bef5bc285ee20379c28e75e7d282576ebf75c319 100644 (file)
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
 #include "GRExprEngineInternalChecks.h"
 
 using namespace clang;
similarity index 98%
rename from lib/Analysis/CheckDeadStores.cpp
rename to lib/Checker/CheckDeadStores.cpp
index 6e4d8998620d2ed794e1a6d93f1c40daf294652d..91c9bb30adb4be551a426195220c2f812de7914c 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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"
similarity index 98%
rename from lib/Analysis/CheckObjCDealloc.cpp
rename to lib/Checker/CheckObjCDealloc.cpp
index 87c1f270a65cc44525f6da183e2c6149536f92b1..7888c7aa2fbc687745d24eb5a9e0dbc7dd4d7f9b 100644 (file)
@@ -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"
similarity index 96%
rename from lib/Analysis/CheckObjCInstMethSignature.cpp
rename to lib/Checker/CheckObjCInstMethSignature.cpp
index 10ba896557dfc40b4a410cdf68ca9a175152659c..67485c6480bc368fae777bb68bee5db806ab5d16 100644 (file)
@@ -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"
similarity index 97%
rename from lib/Analysis/CheckObjCUnusedIVars.cpp
rename to lib/Checker/CheckObjCUnusedIVars.cpp
index d4067c900f3fa136879df1bbebdc1ab05c794aaa..27dc45f2f4bf78d23076f79fcd121a40b6967f69 100644 (file)
@@ -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"
similarity index 99%
rename from lib/Analysis/CheckSecuritySyntaxOnly.cpp
rename to lib/Checker/CheckSecuritySyntaxOnly.cpp
index f4874a5dfe4cd4467e9a8219196c22c296f374a0..3bf7a60202ad1769856eaf5eea28e744f2df9d5c 100644 (file)
@@ -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"
 
similarity index 95%
rename from lib/Analysis/CheckSizeofPointer.cpp
rename to lib/Checker/CheckSizeofPointer.cpp
index 4f5da9f5a7164e0502be35b9016f182b86cc3fd0..3f40235e0b38e15e9fbba7b64f23f6eafb57050f 100644 (file)
@@ -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;
 
similarity index 95%
rename from lib/Analysis/Checker.cpp
rename to lib/Checker/Checker.cpp
index fb9d04d947b7ba188c5a4fdc5aaf807c192356f3..36323b9efb61b3f79ea23d1b2b30c6aff8899d50 100644 (file)
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
 using namespace clang;
 
 Checker::~Checker() {}
similarity index 95%
rename from lib/Analysis/DereferenceChecker.cpp
rename to lib/Checker/DereferenceChecker.cpp
index 98243874d7d97e6dc804cc7633b461ee2c6884e0..623aed21438212e70c209ada1a5c4650fdf0d2fa 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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;
similarity index 97%
rename from lib/Analysis/DivZeroChecker.cpp
rename to lib/Checker/DivZeroChecker.cpp
index 266c236094225f85c04cad8776d0a2565c08b9ab..e1346e11b6fdce45bc3ba45f36e34503f84bbadb 100644 (file)
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
 #include "GRExprEngineInternalChecks.h"
 
 using namespace clang;
similarity index 99%
rename from lib/Analysis/Environment.cpp
rename to lib/Checker/Environment.cpp
index f04cf7b05fed530cbc17828acbdd2052d614a27f..c2c9190fc9ff4384bd4347dfc62381c644f322d1 100644 (file)
@@ -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"
 
similarity index 98%
rename from lib/Analysis/ExplodedGraph.cpp
rename to lib/Checker/ExplodedGraph.cpp
index 3b339ffc0dfe2c3bec4c88c6807b2c484bdc6e25..20429b9519929eafaf48a4dd2c822464a1920757 100644 (file)
@@ -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"
similarity index 97%
rename from lib/Analysis/FixedAddressChecker.cpp
rename to lib/Checker/FixedAddressChecker.cpp
index 031ca44b602eb5ebc0166e33d34f608c75bba58e..04c17d6d7abb4fdf07eefd8a12604a97aa802c89 100644 (file)
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
 #include "GRExprEngineInternalChecks.h"
 
 using namespace clang;
similarity index 96%
rename from lib/Analysis/GRBlockCounter.cpp
rename to lib/Checker/GRBlockCounter.cpp
index 4f4103ac45b4a0e38f0f0fcf0372bc6fc0d25806..3fa3e1ebb9c66752e9d337b3b5fb668cafeb25b8 100644 (file)
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/GRBlockCounter.h"
+#include "clang/Checker/PathSensitive/GRBlockCounter.h"
 #include "llvm/ADT/ImmutableMap.h"
 
 using namespace clang;
similarity index 99%
rename from lib/Analysis/GRCoreEngine.cpp
rename to lib/Checker/GRCoreEngine.cpp
index 209452a3927ac34ac715073c8c4b37e7c208e408..d54b0777eda75f9a56542f10e21af37d445d3845 100644 (file)
@@ -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"
similarity index 99%
rename from lib/Analysis/GRExprEngine.cpp
rename to lib/Checker/GRExprEngine.cpp
index 8f8d859e0ca0608587866bdaab0e9159079b0880..458c0f47369201f2ddbc61d97955c977cad929cc 100644 (file)
@@ -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"
similarity index 96%
rename from lib/Analysis/GRExprEngineExperimentalChecks.cpp
rename to lib/Checker/GRExprEngineExperimentalChecks.cpp
index 33479b0cb7e5071efb08f08491994f700a95c39e..1e94c93a757dfa6e5c00c28019a36c0e4220e1f0 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "GRExprEngineInternalChecks.h"
 #include "GRExprEngineExperimentalChecks.h"
-#include "clang/Analysis/LocalCheckers.h"
+#include "clang/Checker/LocalCheckers.h"
 
 using namespace clang;
 
similarity index 98%
rename from lib/Analysis/GRState.cpp
rename to lib/Checker/GRState.cpp
index 051d465f41b74c53aebb91ddad45c15e23ed0577..2e952068fb0be264a516b8598f2a63adbdb2e569 100644 (file)
@@ -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"
 
similarity index 98%
rename from lib/Analysis/MallocChecker.cpp
rename to lib/Checker/MallocChecker.cpp
index 28f4db78806827c8c7e1c7d17dd733b6dae85e82..3be2e0299bba881a20c31faca735b0257008be95 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #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;
 
similarity index 93%
rename from lib/Analysis/ManagerRegistry.cpp
rename to lib/Checker/ManagerRegistry.cpp
index 8943db2a234380a3734fd8112c58147eb5fab842..d11a997cc0f601a5381509b5d7fe84c72c8598c0 100644 (file)
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/ManagerRegistry.h"
+#include "clang/Checker/ManagerRegistry.h"
 
 using namespace clang;
 
similarity index 99%
rename from lib/Analysis/MemRegion.cpp
rename to lib/Checker/MemRegion.cpp
index 87d60d340934e175a9ab632352874c85c0e78ec1..1e82883a68aa0566a5f6a790eb424968e84f1531 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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;
 
similarity index 94%
rename from lib/Analysis/NSAutoreleasePoolChecker.cpp
rename to lib/Checker/NSAutoreleasePoolChecker.cpp
index 2ff04878f7ab2d326c8c9e2ce7f027d2055f48dd..c6530ec3ed96999ae30ad964d89ab3bd5a668088 100644 (file)
@@ -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"
similarity index 97%
rename from lib/Analysis/NSErrorChecker.cpp
rename to lib/Checker/NSErrorChecker.cpp
index e3cf57fd0c1bdf65afa5965122e1494d3f055f92..dd20e7a8c0404ec4ffb7d5ef5cc7abedece7a15f 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#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"
similarity index 98%
rename from lib/Analysis/NoReturnFunctionChecker.cpp
rename to lib/Checker/NoReturnFunctionChecker.cpp
index 5cfd9acd5f565270fd96b0f16bbd4c7505a2772c..1455d87665db697d5e6eed34a5e12680bdfb17ba 100644 (file)
@@ -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;
similarity index 99%
rename from lib/Analysis/OSAtomicChecker.cpp
rename to lib/Checker/OSAtomicChecker.cpp
index 9d34e9ec5c8bdd76d341cc08bfdfdabb9861f40c..f84388a755668f9892b7ee5757078d285ad1cadf 100644 (file)
@@ -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"
 
similarity index 99%
rename from lib/Analysis/PathDiagnostic.cpp
rename to lib/Checker/PathDiagnostic.cpp
index 734570a21e64e34ac01c86cad6e08f60c17a0ebc..e95fcc2720a89818f6040fe289221e6c436d8086 100644 (file)
@@ -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"
similarity index 97%
rename from lib/Analysis/PointerArithChecker.cpp
rename to lib/Checker/PointerArithChecker.cpp
index 370233ce38bd6e2c79155361c8a7b7389fd96e7f..3d62d0c7b9d71bb73c107aa8f5850cdaab5c4417 100644 (file)
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
 #include "GRExprEngineInternalChecks.h"
 
 using namespace clang;
similarity index 97%
rename from lib/Analysis/PointerSubChecker.cpp
rename to lib/Checker/PointerSubChecker.cpp
index c597a2580751553f414fef9de7e3917e283b34c0..acc848ac8edb1156971a9f95ca291df1c2fc6f0e 100644 (file)
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
+#include "clang/Checker/PathSensitive/CheckerVisitor.h"
 #include "GRExprEngineInternalChecks.h"
 
 using namespace clang;
similarity index 96%
rename from lib/Analysis/PthreadLockChecker.cpp
rename to lib/Checker/PthreadLockChecker.cpp
index e95095c7975ed32d0b4b2892393913cdf4cbf0a3..da1f7f30f273af029a88eb6b71a043d9ef55087d 100644 (file)
@@ -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"
 
similarity index 98%
rename from lib/Analysis/RangeConstraintManager.cpp
rename to lib/Checker/RangeConstraintManager.cpp
index 2cf3dfb6d0dbd80bd4112a1e72bb4b024ac434af..c904c33e08d277afa1fce3dfb3efd250efe12333 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #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"
similarity index 99%
rename from lib/Analysis/RegionStore.cpp
rename to lib/Checker/RegionStore.cpp
index a735ed94578e7d3b9c5011824549da2fcd3f2704..39686c22df616c62630398092d738e170c9ee0ad 100644 (file)
 // 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"
similarity index 94%
rename from lib/Analysis/ReturnPointerRangeChecker.cpp
rename to lib/Checker/ReturnPointerRangeChecker.cpp
index b0350cb576ff09d441c10b4daf595ae316376d80..0a19254528d6730ac5541e45b314a6eb57f4a244 100644 (file)
@@ -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;
 
similarity index 95%
rename from lib/Analysis/ReturnStackAddressChecker.cpp
rename to lib/Checker/ReturnStackAddressChecker.cpp
index 4d7e8ade98f775fa99113558c1e73f983c7add37..3f40bc34728bea5738a2bd8da00500f21fb93536 100644 (file)
@@ -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"
 
similarity index 91%
rename from lib/Analysis/ReturnUndefChecker.cpp
rename to lib/Checker/ReturnUndefChecker.cpp
index 7cd71265805b1b6b6d70c3f60d966f19de52638c..7180bd537136ae8f9bf087a28641030dd2303ad8 100644 (file)
@@ -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;
similarity index 99%
rename from lib/Analysis/SVals.cpp
rename to lib/Checker/SVals.cpp
index fbdb73b0ef2e8de2b9050f98f5be9b742742eedc..efa5521ebd07318f37c7c81c24208fa16a9e3f44 100644 (file)
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Analysis/PathSensitive/GRState.h"
+#include "clang/Checker/PathSensitive/GRState.h"
 #include "clang/Basic/IdentifierTable.h"
 
 using namespace clang;
similarity index 98%
rename from lib/Analysis/SValuator.cpp
rename to lib/Checker/SValuator.cpp
index 8392fcf65a2ca6a553fe81a480614b68e7d81cdf..66cd3193b14dd608b3b4647613b04c3c213e3816 100644 (file)
@@ -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;
 
similarity index 98%
rename from lib/Analysis/SimpleConstraintManager.cpp
rename to lib/Checker/SimpleConstraintManager.cpp
index eca20d574db3f6041d7ee754c9801d5accf0edd0..8c423a99777d57a2de43ae4c330ff46336d4f74e 100644 (file)
@@ -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 {
 
similarity index 96%
rename from lib/Analysis/SimpleConstraintManager.h
rename to lib/Checker/SimpleConstraintManager.h
index 818239831948abf7e46da3506931099826e44b69..5f20e0072b2058ed10c47b837ac30e5954bfc6d0 100644 (file)
@@ -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 {
 
similarity index 99%
rename from lib/Analysis/SimpleSValuator.cpp
rename to lib/Checker/SimpleSValuator.cpp
index 8f2f5a1b134c2b6951e638628ad5b0bf149b9701..7c6e0902cafbc786a75c86f73439d4530e51c0bd 100644 (file)
@@ -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;
 
similarity index 98%
rename from lib/Analysis/Store.cpp
rename to lib/Checker/Store.cpp
index 1724a9250c25189e31cd20baa32c19ffac8abd69..98b86a9f46b51e3d657d0ec65e2e479bf660582d 100644 (file)
@@ -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;
similarity index 98%
rename from lib/Analysis/SymbolManager.cpp
rename to lib/Checker/SymbolManager.cpp
index 3fe36b064e3d56d2d1a8e461890152b7bd55998e..40bdcf65bca4cfac6261dcb102f03f7927fab218 100644 (file)
@@ -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;
similarity index 98%
rename from lib/Analysis/UndefBranchChecker.cpp
rename to lib/Checker/UndefBranchChecker.cpp
index c739d1ac4b229f5d03e050aa390e143b4adb8bcc..e047b187b10847835029844402160dc5f9f7bf24 100644 (file)
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "GRExprEngineInternalChecks.h"
-#include "clang/Analysis/PathSensitive/Checker.h"
+#include "clang/Checker/PathSensitive/Checker.h"
 
 using namespace clang;
 
similarity index 94%
rename from lib/Analysis/UndefResultChecker.cpp
rename to lib/Checker/UndefResultChecker.cpp
index acc86dda5a97c126d9e4eb34ad34604873d94e45..4408c471d261879a1e105824999b8ec247fc626a 100644 (file)
@@ -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;
 
similarity index 94%
rename from lib/Analysis/UndefinedArraySubscriptChecker.cpp
rename to lib/Checker/UndefinedArraySubscriptChecker.cpp
index d6aacaf1f85ef8329042e0658b35fd531482823d..b20154df333dfb8e79b43b7ea3019fd48ddf09e7 100644 (file)
@@ -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;
similarity index 95%
rename from lib/Analysis/UndefinedAssignmentChecker.cpp
rename to lib/Checker/UndefinedAssignmentChecker.cpp
index 4630b823a91e275df2c95d60fff625f04f4f8535..6edc3d8150a4e2d0dfcbc54dc2600a1d304c5ef0 100644 (file)
@@ -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;
 
similarity index 94%
rename from lib/Analysis/VLASizeChecker.cpp
rename to lib/Checker/VLASizeChecker.cpp
index 2690d6f0cffca2e884bd49a4a860babb2d942c2a..b41126c5e73930a8f39df1e95b48d97e973828cf 100644 (file)
@@ -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;
 
similarity index 97%
rename from lib/Analysis/ValueManager.cpp
rename to lib/Checker/ValueManager.cpp
index d09137330cb26d4a0ebe1d124750047039e1ab78..5359489a2299bef805a1e6ee5b45188ced2bd385 100644 (file)
@@ -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;
index 45a3b15caecc0e6cf05057394092570c3df8d928..d73114eaf24660da9a049653db1bf8d6f6d95061 100644 (file)
 #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"
index b163e267b049497126af6cd64ed4f68778d91214..b5975c27dfb7a7b45bda231d3476c9653ff0e5e8 100644 (file)
@@ -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"
index 98be869d26460818b8765a4bea34612e544e8279..3c204fb5f1018eb0563da4e60c4f15c0428d2573 100644 (file)
@@ -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"
index d499ee555a38df6337d713151c5c4ea2d7e115bf..538bf439407128e8db40d22dfe2972863df5e94c 100755 (executable)
@@ -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
 
index 6ff8b1d75371eaf60657a8aa4e4848a972603326..0a7b7f0911f2cc13309e36984eca98fb345b76a1 100644 (file)
@@ -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"
index 938c41efbe6c90e85e2445d531054fc6c23265fa..876fcb32baee714c805e3c9b248b7c9ed7599a2c 100644 (file)
@@ -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"
index 50976f7b704b76eb9c6fbc9897c6699ca3c90a4a..e55fbe3d091977555f278a2e33405715c0c88b3e 100644 (file)
@@ -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"
index 90fb09c0d9a8f8dea66372acb58fb218edb929ba..cfd9b689556cf61566af027887d3952f37684211 100644 (file)
@@ -4,6 +4,7 @@ set( LLVM_USED_LIBS
   clangDriver
   clangFrontend
   clangCodeGen
+  clangChecker
   clangAnalysis
   clangRewrite
   clangSema
index b86a5309beb601ad4b08c3e09ec13a0a1a1b14e1..6610e1f68a463b0421852039f244c210522cd7ed 100644 (file)
@@ -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