[cfe-commits] r142782 - in /cfe/trunk: include/clang/Analysis/ include/clang/Analysis/Analyses/ include/clang/StaticAnalyzer/Core/BugReporter/ include/clang/StaticAnalyzer/Core/PathSensitive/ lib/Analysis/ lib/Sema/ lib/StaticAnalyzer/Checkers/ l

Chandler Carruth chandlerc at google.com
Sun Oct 23 19:00:53 PDT 2011


On Sun, Oct 23, 2011 at 6:48 PM, Chandler Carruth <chandlerc at google.com>wrote:

> FYI, this broke the CMake build because the CMakeLists.txt was updated to
> the new name (AnalysisDeclContext.cpp). I'm fixing it up by completing the
> file moves as well.
>

I fixed the .cpp file, and I have a change that fixes the .h file as well,
but I'll hold off submitting it in case you're already on that or have other
changes overlapping with it. Don't want to cause unnecessary merge
conflicts.

If you want me to submit the .h file rename, just let me know and I'll mash
the submit button. =]


>
> On Sun, Oct 23, 2011 at 6:32 PM, Ted Kremenek <kremenek at apple.com> wrote:
>
>> Author: kremenek
>> Date: Sun Oct 23 20:32:45 2011
>> New Revision: 142782
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=142782&view=rev
>> Log:
>> Rename AnalysisContext to AnalysisDeclContext.  Not only is this name more
>> accurate, but it frees up the name AnalysisContext for other uses.
>>
>> Modified:
>>    cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h
>>    cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h
>>    cfe/trunk/include/clang/Analysis/Analyses/ReachableCode.h
>>    cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h
>>    cfe/trunk/include/clang/Analysis/Analyses/UninitializedValues.h
>>    cfe/trunk/include/clang/Analysis/AnalysisContext.h
>>    cfe/trunk/include/clang/Analysis/ProgramPoint.h
>>
>>  cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
>>
>>  cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
>>
>>  cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
>>    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
>>    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
>>    cfe/trunk/lib/Analysis/AnalysisContext.cpp
>>    cfe/trunk/lib/Analysis/CMakeLists.txt
>>    cfe/trunk/lib/Analysis/LiveVariables.cpp
>>    cfe/trunk/lib/Analysis/PostOrderCFGView.cpp
>>    cfe/trunk/lib/Analysis/ReachableCode.cpp
>>    cfe/trunk/lib/Analysis/ThreadSafety.cpp
>>    cfe/trunk/lib/Analysis/UninitializedValues.cpp
>>    cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
>>    cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
>>    cfe/trunk/test/Analysis/inline3.c
>>    cfe/trunk/test/SemaCXX/missing-header.cpp
>>
>> Modified: cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h (original)
>> +++ cfe/trunk/include/clang/Analysis/Analyses/LiveVariables.h Sun Oct 23
>> 20:32:45 2011
>> @@ -70,7 +70,7 @@
>>   virtual ~LiveVariables();
>>
>>   /// Compute the liveness information for a given CFG.
>> -  static LiveVariables *computeLiveness(AnalysisContext &analysisContext,
>> +  static LiveVariables *computeLiveness(AnalysisDeclContext
>> &analysisContext,
>>                                         bool killAtAssign);
>>
>>   /// Return true if a variable is live at the end of a
>> @@ -93,7 +93,7 @@
>>
>>   void runOnAllBlocks(Observer &obs);
>>
>> -  static LiveVariables *create(AnalysisContext &analysisContext) {
>> +  static LiveVariables *create(AnalysisDeclContext &analysisContext) {
>>     return computeLiveness(analysisContext, true);
>>   }
>>
>> @@ -106,7 +106,7 @@
>>
>>  class RelaxedLiveVariables : public LiveVariables {
>>  public:
>> -  static LiveVariables *create(AnalysisContext &analysisContext) {
>> +  static LiveVariables *create(AnalysisDeclContext &analysisContext) {
>>     return computeLiveness(analysisContext, false);
>>   }
>>
>>
>> Modified: cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h
>> (original)
>> +++ cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h Sun Oct
>> 23 20:32:45 2011
>> @@ -101,7 +101,7 @@
>>   // Used by AnalyisContext to construct this object.
>>   static const void *getTag();
>>
>> -  static PostOrderCFGView *create(AnalysisContext &analysisContext);
>> +  static PostOrderCFGView *create(AnalysisDeclContext &analysisContext);
>>  };
>>
>>  } // end clang namespace
>>
>> Modified: cfe/trunk/include/clang/Analysis/Analyses/ReachableCode.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ReachableCode.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/Analyses/ReachableCode.h (original)
>> +++ cfe/trunk/include/clang/Analysis/Analyses/ReachableCode.h Sun Oct 23
>> 20:32:45 2011
>> @@ -25,7 +25,7 @@
>>  }
>>
>>  namespace clang {
>> -  class AnalysisContext;
>> +  class AnalysisDeclContext;
>>   class CFGBlock;
>>  }
>>
>> @@ -48,7 +48,7 @@
>>  unsigned ScanReachableFromBlock(const CFGBlock *Start,
>>                                 llvm::BitVector &Reachable);
>>
>> -void FindUnreachableCode(AnalysisContext &AC, Callback &CB);
>> +void FindUnreachableCode(AnalysisDeclContext &AC, Callback &CB);
>>
>>  }} // end namespace clang::reachable_code
>>
>>
>> Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h (original)
>> +++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h Sun Oct 23
>> 20:32:45 2011
>> @@ -143,7 +143,7 @@
>>  /// We traverse the blocks in the CFG, compute the set of mutexes that
>> are held
>>  /// at the end of each block, and issue warnings for thread safety
>> violations.
>>  /// Each block in the CFG is traversed exactly once.
>> -void runThreadSafetyAnalysis(AnalysisContext &AC, ThreadSafetyHandler
>> &Handler);
>> +void runThreadSafetyAnalysis(AnalysisDeclContext &AC, ThreadSafetyHandler
>> &Handler);
>>
>>  /// \brief Helper function that returns a LockKind required for the given
>> level
>>  /// of access.
>>
>> Modified: cfe/trunk/include/clang/Analysis/Analyses/UninitializedValues.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/UninitializedValues.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/Analyses/UninitializedValues.h
>> (original)
>> +++ cfe/trunk/include/clang/Analysis/Analyses/UninitializedValues.h Sun
>> Oct 23 20:32:45 2011
>> @@ -17,7 +17,7 @@
>>
>>  namespace clang {
>>
>> -class AnalysisContext;
>> +class AnalysisDeclContext;
>>  class CFG;
>>  class DeclContext;
>>  class Expr;
>> @@ -45,7 +45,7 @@
>>  };
>>
>>  void runUninitializedVariablesAnalysis(const DeclContext &dc, const CFG
>> &cfg,
>> -                                       AnalysisContext &ac,
>> +                                       AnalysisDeclContext &ac,
>>                                        UninitVariablesHandler &handler,
>>                                        UninitVariablesAnalysisStats
>> &stats);
>>
>>
>> Modified: cfe/trunk/include/clang/Analysis/AnalysisContext.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/AnalysisContext.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/AnalysisContext.h (original)
>> +++ cfe/trunk/include/clang/Analysis/AnalysisContext.h Sun Oct 23 20:32:45
>> 2011
>> @@ -7,7 +7,7 @@
>>  //
>>
>>  //===----------------------------------------------------------------------===//
>>  //
>> -// This file defines AnalysisContext, a class that manages the analysis
>> context
>> +// This file defines AnalysisDeclContext, a class that manages the
>> analysis context
>>  // data for path sensitive analysis.
>>  //
>>
>>  //===----------------------------------------------------------------------===//
>> @@ -38,13 +38,13 @@
>>  class ImplicitParamDecl;
>>  class LocationContextManager;
>>  class StackFrameContext;
>> -class AnalysisContextManager;
>> +class AnalysisDeclContextManager;
>>  class LocationContext;
>>
>>  namespace idx { class TranslationUnit; }
>>
>>  /// The base class of a hierarchy of objects representing analyses tied
>> -/// to AnalysisContext.
>> +/// to AnalysisDeclContext.
>>  class ManagedAnalysis {
>>  protected:
>>   ManagedAnalysis() {}
>> @@ -58,18 +58,18 @@
>>   // Which returns a fixed pointer address to distinguish classes of
>>   // analysis objects.  They also need to implement:
>>   //
>> -  //  static [Derived*] create(AnalysisContext &Ctx);
>> +  //  static [Derived*] create(AnalysisDeclContext &Ctx);
>>   //
>> -  // which creates the analysis object given an AnalysisContext.
>> +  // which creates the analysis object given an AnalysisDeclContext.
>>  };
>>
>>
>> -/// AnalysisContext contains the context data for the function or method
>> under
>> +/// AnalysisDeclContext contains the context data for the function or
>> method under
>>  /// analysis.
>> -class AnalysisContext {
>> -  /// Backpoint to the AnalysisManager object that created this
>> AnalysisContext.
>> +class AnalysisDeclContext {
>> +  /// Backpoint to the AnalysisManager object that created this
>> AnalysisDeclContext.
>>   /// This may be null.
>> -  AnalysisContextManager *Manager;
>> +  AnalysisDeclContextManager *Manager;
>>
>>   const Decl *D;
>>
>> @@ -98,16 +98,16 @@
>>   void *ManagedAnalyses;
>>
>>  public:
>> -  AnalysisContext(AnalysisContextManager *Mgr,
>> +  AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
>>                   const Decl *D,
>>                   idx::TranslationUnit *TU);
>>
>> -  AnalysisContext(AnalysisContextManager *Mgr,
>> +  AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
>>                   const Decl *D,
>>                   idx::TranslationUnit *TU,
>>                   const CFG::BuildOptions &BuildOptions);
>>
>> -  ~AnalysisContext();
>> +  ~AnalysisDeclContext();
>>
>>   ASTContext &getASTContext() { return D->getASTContext(); }
>>   const Decl *getDecl() const { return D; }
>> @@ -163,7 +163,7 @@
>>     getReferencedBlockVars(const BlockDecl *BD);
>>
>>   /// Return the ImplicitParamDecl* associated with 'self' if this
>> -  /// AnalysisContext wraps an ObjCMethodDecl.  Returns NULL otherwise.
>> +  /// AnalysisDeclContext wraps an ObjCMethodDecl.  Returns NULL
>> otherwise.
>>   const ImplicitParamDecl *getSelfDecl() const;
>>
>>   const StackFrameContext *getStackFrame(LocationContext const *Parent,
>> @@ -195,13 +195,13 @@
>>  private:
>>   ContextKind Kind;
>>
>> -  // AnalysisContext can't be const since some methods may modify its
>> member.
>> -  AnalysisContext *Ctx;
>> +  // AnalysisDeclContext can't be const since some methods may modify its
>> member.
>> +  AnalysisDeclContext *Ctx;
>>
>>   const LocationContext *Parent;
>>
>>  protected:
>> -  LocationContext(ContextKind k, AnalysisContext *ctx,
>> +  LocationContext(ContextKind k, AnalysisDeclContext *ctx,
>>                   const LocationContext *parent)
>>     : Kind(k), Ctx(ctx), Parent(parent) {}
>>
>> @@ -210,7 +210,7 @@
>>
>>   ContextKind getKind() const { return Kind; }
>>
>> -  AnalysisContext *getAnalysisContext() const { return Ctx; }
>> +  AnalysisDeclContext *getAnalysisDeclContext() const { return Ctx; }
>>
>>   idx::TranslationUnit *getTranslationUnit() const {
>>     return Ctx->getTranslationUnit();
>> @@ -220,17 +220,17 @@
>>
>>   bool isParentOf(const LocationContext *LC) const;
>>
>> -  const Decl *getDecl() const { return getAnalysisContext()->getDecl(); }
>> +  const Decl *getDecl() const { return
>> getAnalysisDeclContext()->getDecl(); }
>>
>> -  CFG *getCFG() const { return getAnalysisContext()->getCFG(); }
>> +  CFG *getCFG() const { return getAnalysisDeclContext()->getCFG(); }
>>
>>   template <typename T>
>>   T *getAnalysis() const {
>> -    return getAnalysisContext()->getAnalysis<T>();
>> +    return getAnalysisDeclContext()->getAnalysis<T>();
>>   }
>>
>>   ParentMap &getParentMap() const {
>> -    return getAnalysisContext()->getParentMap();
>> +    return getAnalysisDeclContext()->getParentMap();
>>   }
>>
>>   const ImplicitParamDecl *getSelfDecl() const {
>> @@ -248,7 +248,7 @@
>>  public:
>>   static void ProfileCommon(llvm::FoldingSetNodeID &ID,
>>                             ContextKind ck,
>> -                            AnalysisContext *ctx,
>> +                            AnalysisDeclContext *ctx,
>>                             const LocationContext *parent,
>>                             const void *data);
>>  };
>> @@ -264,7 +264,7 @@
>>   unsigned Index;
>>
>>   friend class LocationContextManager;
>> -  StackFrameContext(AnalysisContext *ctx, const LocationContext *parent,
>> +  StackFrameContext(AnalysisDeclContext *ctx, const LocationContext
>> *parent,
>>                     const Stmt *s, const CFGBlock *blk,
>>                     unsigned idx)
>>     : LocationContext(StackFrame, ctx, parent), CallSite(s),
>> @@ -281,7 +281,7 @@
>>
>>   void Profile(llvm::FoldingSetNodeID &ID);
>>
>> -  static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
>> +  static void Profile(llvm::FoldingSetNodeID &ID, AnalysisDeclContext
>> *ctx,
>>                       const LocationContext *parent, const Stmt *s,
>>                       const CFGBlock *blk, unsigned idx) {
>>     ProfileCommon(ID, StackFrame, ctx, parent, s);
>> @@ -298,7 +298,7 @@
>>   const Stmt *Enter;
>>
>>   friend class LocationContextManager;
>> -  ScopeContext(AnalysisContext *ctx, const LocationContext *parent,
>> +  ScopeContext(AnalysisDeclContext *ctx, const LocationContext *parent,
>>                const Stmt *s)
>>     : LocationContext(Scope, ctx, parent), Enter(s) {}
>>
>> @@ -307,7 +307,7 @@
>>
>>   void Profile(llvm::FoldingSetNodeID &ID);
>>
>> -  static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
>> +  static void Profile(llvm::FoldingSetNodeID &ID, AnalysisDeclContext
>> *ctx,
>>                       const LocationContext *parent, const Stmt *s) {
>>     ProfileCommon(ID, Scope, ctx, parent, s);
>>   }
>> @@ -324,7 +324,7 @@
>>
>>   friend class LocationContextManager;
>>
>> -  BlockInvocationContext(AnalysisContext *ctx, const LocationContext
>> *parent,
>> +  BlockInvocationContext(AnalysisDeclContext *ctx, const LocationContext
>> *parent,
>>                          const BlockDecl *bd)
>>     : LocationContext(Block, ctx, parent), BD(bd) {}
>>
>> @@ -335,7 +335,7 @@
>>
>>   void Profile(llvm::FoldingSetNodeID &ID);
>>
>> -  static void Profile(llvm::FoldingSetNodeID &ID, AnalysisContext *ctx,
>> +  static void Profile(llvm::FoldingSetNodeID &ID, AnalysisDeclContext
>> *ctx,
>>                       const LocationContext *parent, const BlockDecl *bd)
>> {
>>     ProfileCommon(ID, Block, ctx, parent, bd);
>>   }
>> @@ -350,12 +350,12 @@
>>  public:
>>   ~LocationContextManager();
>>
>> -  const StackFrameContext *getStackFrame(AnalysisContext *ctx,
>> +  const StackFrameContext *getStackFrame(AnalysisDeclContext *ctx,
>>                                          const LocationContext *parent,
>>                                          const Stmt *s,
>>                                          const CFGBlock *blk, unsigned
>> idx);
>>
>> -  const ScopeContext *getScope(AnalysisContext *ctx,
>> +  const ScopeContext *getScope(AnalysisDeclContext *ctx,
>>                                const LocationContext *parent,
>>                                const Stmt *s);
>>
>> @@ -363,26 +363,26 @@
>>   void clear();
>>  private:
>>   template <typename LOC, typename DATA>
>> -  const LOC *getLocationContext(AnalysisContext *ctx,
>> +  const LOC *getLocationContext(AnalysisDeclContext *ctx,
>>                                 const LocationContext *parent,
>>                                 const DATA *d);
>>  };
>>
>> -class AnalysisContextManager {
>> -  typedef llvm::DenseMap<const Decl*, AnalysisContext*> ContextMap;
>> +class AnalysisDeclContextManager {
>> +  typedef llvm::DenseMap<const Decl*, AnalysisDeclContext*> ContextMap;
>>
>>   ContextMap Contexts;
>>   LocationContextManager LocContexts;
>>   CFG::BuildOptions cfgBuildOptions;
>>
>>  public:
>> -  AnalysisContextManager(bool useUnoptimizedCFG = false,
>> +  AnalysisDeclContextManager(bool useUnoptimizedCFG = false,
>>                          bool addImplicitDtors = false,
>>                          bool addInitializers = false);
>>
>> -  ~AnalysisContextManager();
>> +  ~AnalysisDeclContextManager();
>>
>> -  AnalysisContext *getContext(const Decl *D, idx::TranslationUnit *TU =
>> 0);
>> +  AnalysisDeclContext *getContext(const Decl *D, idx::TranslationUnit *TU
>> = 0);
>>
>>   bool getUseUnoptimizedCFG() const {
>>     return !cfgBuildOptions.PruneTriviallyFalseEdges;
>> @@ -392,7 +392,7 @@
>>     return cfgBuildOptions;
>>   }
>>
>> -  const StackFrameContext *getStackFrame(AnalysisContext *Ctx,
>> +  const StackFrameContext *getStackFrame(AnalysisDeclContext *Ctx,
>>                                          LocationContext const *Parent,
>>                                          const Stmt *S,
>>                                          const CFGBlock *Blk,
>> @@ -416,11 +416,11 @@
>>   }
>>
>>
>> -  /// Discard all previously created AnalysisContexts.
>> +  /// Discard all previously created AnalysisDeclContexts.
>>   void clear();
>>
>>  private:
>> -  friend class AnalysisContext;
>> +  friend class AnalysisDeclContext;
>>
>>   LocationContextManager &getLocationContextManager() {
>>     return LocContexts;
>>
>> Modified: cfe/trunk/include/clang/Analysis/ProgramPoint.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ProgramPoint.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Analysis/ProgramPoint.h (original)
>> +++ cfe/trunk/include/clang/Analysis/ProgramPoint.h Sun Oct 23 20:32:45
>> 2011
>> @@ -28,7 +28,7 @@
>>
>>  namespace clang {
>>
>> -class AnalysisContext;
>> +class AnalysisDeclContext;
>>  class FunctionDecl;
>>  class LocationContext;
>>  class ProgramPointTag;
>>
>> Modified:
>> cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> ---
>> cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
>> (original)
>> +++
>> cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h Sun
>> Oct 23 20:32:45 2011
>> @@ -24,7 +24,7 @@
>>
>>  namespace clang {
>>
>> -class AnalysisContext;
>> +class AnalysisDeclContext;
>>  class BinaryOperator;
>>  class CompoundStmt;
>>  class Decl;
>> @@ -89,8 +89,8 @@
>>   PathDiagnosticRange() : isPoint(false) {}
>>  };
>>
>> -typedef llvm::PointerUnion<const LocationContext*, AnalysisContext*>
>> -
>> LocationOrAnalysisContext;
>> +typedef llvm::PointerUnion<const LocationContext*, AnalysisDeclContext*>
>> +
>> LocationOrAnalysisDeclContext;
>>
>>  class PathDiagnosticLocation {
>>  private:
>> @@ -111,10 +111,10 @@
>>
>>   FullSourceLoc
>>     genLocation(SourceLocation L = SourceLocation(),
>> -                LocationOrAnalysisContext LAC = (AnalysisContext*)0)
>> const;
>> +                LocationOrAnalysisDeclContext LAC =
>> (AnalysisDeclContext*)0) const;
>>
>>   PathDiagnosticRange
>> -    genRange(LocationOrAnalysisContext LAC = (AnalysisContext*)0) const;
>> +    genRange(LocationOrAnalysisDeclContext LAC = (AnalysisDeclContext*)0)
>> const;
>>
>>  public:
>>   /// Create an invalid location.
>> @@ -124,7 +124,7 @@
>>   /// Create a location corresponding to the given statement.
>>   PathDiagnosticLocation(const Stmt *s,
>>                          const SourceManager &sm,
>> -                         LocationOrAnalysisContext lac)
>> +                         LocationOrAnalysisDeclContext lac)
>>     : K(StmtK), S(s), D(0), SM(&sm),
>>       Loc(genLocation(SourceLocation(), lac)),
>>       Range(genRange(lac)) {
>> @@ -153,7 +153,7 @@
>>   /// Create a location for the beginning of the statement.
>>   static PathDiagnosticLocation createBegin(const Stmt *S,
>>                                             const SourceManager &SM,
>> -                                            const
>> LocationOrAnalysisContext LAC);
>> +                                            const
>> LocationOrAnalysisDeclContext LAC);
>>
>>   /// Create the location for the operator of the binary expression.
>>   /// Assumes the statement has a valid location.
>>
>> Modified:
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> ---
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
>> (original)
>> +++
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
>> Sun Oct 23 20:32:45 2011
>> @@ -31,7 +31,7 @@
>>   class CheckerManager;
>>
>>  class AnalysisManager : public BugReporterData {
>> -  AnalysisContextManager AnaCtxMgr;
>> +  AnalysisDeclContextManager AnaCtxMgr;
>>
>>   ASTContext &Ctx;
>>   DiagnosticsEngine &Diags;
>> @@ -99,7 +99,7 @@
>>     AnaCtxMgr.clear();
>>   }
>>
>> -  AnalysisContextManager& getAnalysisContextManager() {
>> +  AnalysisDeclContextManager& getAnalysisDeclContextManager() {
>>     return AnaCtxMgr;
>>   }
>>
>> @@ -164,7 +164,7 @@
>>
>>   bool hasIndexer() const { return Idxer != 0; }
>>
>> -  AnalysisContext *getAnalysisContextInAnotherTU(const Decl *D);
>> +  AnalysisDeclContext *getAnalysisDeclContextInAnotherTU(const Decl *D);
>>
>>   CFG *getCFG(Decl const *D) {
>>     return AnaCtxMgr.getContext(D)->getCFG();
>> @@ -179,11 +179,11 @@
>>     return AnaCtxMgr.getContext(D)->getParentMap();
>>   }
>>
>> -  AnalysisContext *getAnalysisContext(const Decl *D) {
>> +  AnalysisDeclContext *getAnalysisDeclContext(const Decl *D) {
>>     return AnaCtxMgr.getContext(D);
>>   }
>>
>> -  AnalysisContext *getAnalysisContext(const Decl *D, idx::TranslationUnit
>> *TU) {
>> +  AnalysisDeclContext *getAnalysisDeclContext(const Decl *D,
>> idx::TranslationUnit *TU) {
>>     return AnaCtxMgr.getContext(D, TU);
>>   }
>>
>>
>> Modified:
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> ---
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
>> (original)
>> +++
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
>> Sun Oct 23 20:32:45 2011
>> @@ -147,8 +147,8 @@
>>     Eng.getBugReporter().EmitReport(R);
>>   }
>>
>> -  AnalysisContext *getCurrentAnalysisContext() const {
>> -    return Pred->getLocationContext()->getAnalysisContext();
>> +  AnalysisDeclContext *getCurrentAnalysisDeclContext() const {
>> +    return Pred->getLocationContext()->getAnalysisDeclContext();
>>   }
>>
>>  private:
>>
>> Modified:
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
>> (original)
>> +++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
>> Sun Oct 23 20:32:45 2011
>> @@ -28,7 +28,7 @@
>>
>>  namespace clang {
>>
>> -class AnalysisContextManager;
>> +class AnalysisDeclContextManager;
>>  class ObjCForCollectionStmt;
>>
>>  namespace ento {
>> @@ -40,7 +40,7 @@
>>  class ExprEngine : public SubEngine {
>>   AnalysisManager &AMgr;
>>
>> -  AnalysisContextManager &AnalysisContexts;
>> +  AnalysisDeclContextManager &AnalysisDeclContexts;
>>
>>   CoreEngine Engine;
>>
>>
>> Modified:
>> cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
>> (original)
>> +++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
>> Sun Oct 23 20:32:45 2011
>> @@ -448,11 +448,11 @@
>>   friend class MemRegionManager;
>>
>>   const BlockDecl *BD;
>> -  AnalysisContext *AC;
>> +  AnalysisDeclContext *AC;
>>   CanQualType locTy;
>>
>>   BlockTextRegion(const BlockDecl *bd, CanQualType lTy,
>> -                  AnalysisContext *ac, const MemRegion* sreg)
>> +                  AnalysisDeclContext *ac, const MemRegion* sreg)
>>     : CodeTextRegion(sreg, BlockTextRegionKind), BD(bd), AC(ac),
>> locTy(lTy) {}
>>
>>  public:
>> @@ -464,14 +464,14 @@
>>     return BD;
>>   }
>>
>> -  AnalysisContext *getAnalysisContext() const { return AC; }
>> +  AnalysisDeclContext *getAnalysisDeclContext() const { return AC; }
>>
>>   virtual void dumpToStream(raw_ostream &os) const;
>>
>>   void Profile(llvm::FoldingSetNodeID& ID) const;
>>
>>   static void ProfileRegion(llvm::FoldingSetNodeID& ID, const BlockDecl
>> *BD,
>> -                            CanQualType, const AnalysisContext*,
>> +                            CanQualType, const AnalysisDeclContext*,
>>                             const MemRegion*);
>>
>>   static bool classof(const MemRegion* R) {
>> @@ -1038,7 +1038,7 @@
>>   const FunctionTextRegion *getFunctionTextRegion(const FunctionDecl *FD);
>>   const BlockTextRegion *getBlockTextRegion(const BlockDecl *BD,
>>                                             CanQualType locTy,
>> -                                            AnalysisContext *AC);
>> +                                            AnalysisDeclContext *AC);
>>
>>   /// getBlockDataRegion - Get the memory region associated with an
>> instance
>>   ///  of a block.  Unlike many other MemRegions, the LocationContext*
>>
>> Modified: cfe/trunk/lib/Analysis/AnalysisContext.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/AnalysisContext.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/AnalysisContext.cpp (original)
>> +++ cfe/trunk/lib/Analysis/AnalysisContext.cpp Sun Oct 23 20:32:45 2011
>> @@ -1,4 +1,4 @@
>> -//== AnalysisContext.cpp - Analysis context for Path Sens analysis -*-
>> C++ -*-//
>> +//== AnalysisDeclContext.cpp - Analysis context for Path Sens analysis
>> -*- C++ -*-//
>>  //
>>  //                     The LLVM Compiler Infrastructure
>>  //
>> @@ -7,7 +7,7 @@
>>  //
>>
>>  //===----------------------------------------------------------------------===//
>>  //
>> -// This file defines AnalysisContext, a class that manages the analysis
>> context
>> +// This file defines AnalysisDeclContext, a class that manages the
>> analysis context
>>  // data for path sensitive analysis.
>>  //
>>
>>  //===----------------------------------------------------------------------===//
>> @@ -32,7 +32,7 @@
>>
>>  typedef llvm::DenseMap<const void *, ManagedAnalysis *>
>> ManagedAnalysisMap;
>>
>> -AnalysisContext::AnalysisContext(AnalysisContextManager *Mgr,
>> +AnalysisDeclContext::AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
>>                                  const Decl *d,
>>                                  idx::TranslationUnit *tu,
>>                                  const CFG::BuildOptions &buildOptions)
>> @@ -49,7 +49,7 @@
>>   cfgBuildOptions.forcedBlkExprs = &forcedBlkExprs;
>>  }
>>
>> -AnalysisContext::AnalysisContext(AnalysisContextManager *Mgr,
>> +AnalysisDeclContext::AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
>>                                  const Decl *d,
>>                                  idx::TranslationUnit *tu)
>>  : Manager(Mgr),
>> @@ -64,7 +64,7 @@
>>   cfgBuildOptions.forcedBlkExprs = &forcedBlkExprs;
>>  }
>>
>> -AnalysisContextManager::AnalysisContextManager(bool useUnoptimizedCFG,
>> +AnalysisDeclContextManager::AnalysisDeclContextManager(bool
>> useUnoptimizedCFG,
>>                                                bool addImplicitDtors,
>>                                                bool addInitializers) {
>>   cfgBuildOptions.PruneTriviallyFalseEdges = !useUnoptimizedCFG;
>> @@ -72,13 +72,13 @@
>>   cfgBuildOptions.AddInitializers = addInitializers;
>>  }
>>
>> -void AnalysisContextManager::clear() {
>> +void AnalysisDeclContextManager::clear() {
>>   for (ContextMap::iterator I = Contexts.begin(), E = Contexts.end();
>> I!=E; ++I)
>>     delete I->second;
>>   Contexts.clear();
>>  }
>>
>> -Stmt *AnalysisContext::getBody() const {
>> +Stmt *AnalysisDeclContext::getBody() const {
>>   if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
>>     return FD->getBody();
>>   else if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
>> @@ -92,14 +92,14 @@
>>   llvm_unreachable("unknown code decl");
>>  }
>>
>> -const ImplicitParamDecl *AnalysisContext::getSelfDecl() const {
>> +const ImplicitParamDecl *AnalysisDeclContext::getSelfDecl() const {
>>   if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
>>     return MD->getSelfDecl();
>>
>>   return NULL;
>>  }
>>
>> -void AnalysisContext::registerForcedBlockExpression(const Stmt *stmt) {
>> +void AnalysisDeclContext::registerForcedBlockExpression(const Stmt *stmt)
>> {
>>   if (!forcedBlkExprs)
>>     forcedBlkExprs = new CFG::BuildOptions::ForcedBlkExprs();
>>   // Default construct an entry for 'stmt'.
>> @@ -109,7 +109,7 @@
>>  }
>>
>>  const CFGBlock *
>> -AnalysisContext::getBlockForRegisteredExpression(const Stmt *stmt) {
>> +AnalysisDeclContext::getBlockForRegisteredExpression(const Stmt *stmt) {
>>   assert(forcedBlkExprs);
>>   if (const Expr *e = dyn_cast<Expr>(stmt))
>>     stmt = e->IgnoreParens();
>> @@ -119,7 +119,7 @@
>>   return itr->second;
>>  }
>>
>> -CFG *AnalysisContext::getCFG() {
>> +CFG *AnalysisDeclContext::getCFG() {
>>   if (!cfgBuildOptions.PruneTriviallyFalseEdges)
>>     return getUnoptimizedCFG();
>>
>> @@ -133,7 +133,7 @@
>>   return cfg.get();
>>  }
>>
>> -CFG *AnalysisContext::getUnoptimizedCFG() {
>> +CFG *AnalysisDeclContext::getUnoptimizedCFG() {
>>   if (!builtCompleteCFG) {
>>     SaveAndRestore<bool>
>> NotPrune(cfgBuildOptions.PruneTriviallyFalseEdges,
>>                                   false);
>> @@ -146,7 +146,7 @@
>>   return completeCFG.get();
>>  }
>>
>> -CFGStmtMap *AnalysisContext::getCFGStmtMap() {
>> +CFGStmtMap *AnalysisDeclContext::getCFGStmtMap() {
>>   if (cfgStmtMap)
>>     return cfgStmtMap.get();
>>
>> @@ -158,7 +158,7 @@
>>   return 0;
>>  }
>>
>> -CFGReverseBlockReachabilityAnalysis
>> *AnalysisContext::getCFGReachablityAnalysis() {
>> +CFGReverseBlockReachabilityAnalysis
>> *AnalysisDeclContext::getCFGReachablityAnalysis() {
>>   if (CFA)
>>     return CFA.get();
>>
>> @@ -170,39 +170,39 @@
>>   return 0;
>>  }
>>
>> -void AnalysisContext::dumpCFG() {
>> +void AnalysisDeclContext::dumpCFG() {
>>     getCFG()->dump(getASTContext().getLangOptions());
>>  }
>>
>> -ParentMap &AnalysisContext::getParentMap() {
>> +ParentMap &AnalysisDeclContext::getParentMap() {
>>   if (!PM)
>>     PM.reset(new ParentMap(getBody()));
>>   return *PM;
>>  }
>>
>> -PseudoConstantAnalysis *AnalysisContext::getPseudoConstantAnalysis() {
>> +PseudoConstantAnalysis *AnalysisDeclContext::getPseudoConstantAnalysis()
>> {
>>   if (!PCA)
>>     PCA.reset(new PseudoConstantAnalysis(getBody()));
>>   return PCA.get();
>>  }
>>
>> -AnalysisContext *AnalysisContextManager::getContext(const Decl *D,
>> +AnalysisDeclContext *AnalysisDeclContextManager::getContext(const Decl
>> *D,
>>                                                     idx::TranslationUnit
>> *TU) {
>> -  AnalysisContext *&AC = Contexts[D];
>> +  AnalysisDeclContext *&AC = Contexts[D];
>>   if (!AC)
>> -    AC = new AnalysisContext(this, D, TU, cfgBuildOptions);
>> +    AC = new AnalysisDeclContext(this, D, TU, cfgBuildOptions);
>>   return AC;
>>  }
>>
>>  const StackFrameContext *
>> -AnalysisContext::getStackFrame(LocationContext const *Parent, const Stmt
>> *S,
>> +AnalysisDeclContext::getStackFrame(LocationContext const *Parent, const
>> Stmt *S,
>>                                const CFGBlock *Blk, unsigned Idx) {
>>   return getLocationContextManager().getStackFrame(this, Parent, S, Blk,
>> Idx);
>>  }
>>
>> -LocationContextManager & AnalysisContext::getLocationContextManager() {
>> +LocationContextManager & AnalysisDeclContext::getLocationContextManager()
>> {
>>   assert(Manager &&
>> -         "Cannot create LocationContexts without an
>> AnalysisContextManager!");
>> +         "Cannot create LocationContexts without an
>> AnalysisDeclContextManager!");
>>   return Manager->getLocationContextManager();
>>  }
>>
>> @@ -212,7 +212,7 @@
>>
>>  void LocationContext::ProfileCommon(llvm::FoldingSetNodeID &ID,
>>                                     ContextKind ck,
>> -                                    AnalysisContext *ctx,
>> +                                    AnalysisDeclContext *ctx,
>>                                     const LocationContext *parent,
>>                                     const void *data) {
>>   ID.AddInteger(ck);
>> @@ -222,15 +222,15 @@
>>  }
>>
>>  void StackFrameContext::Profile(llvm::FoldingSetNodeID &ID) {
>> -  Profile(ID, getAnalysisContext(), getParent(), CallSite, Block, Index);
>> +  Profile(ID, getAnalysisDeclContext(), getParent(), CallSite, Block,
>> Index);
>>  }
>>
>>  void ScopeContext::Profile(llvm::FoldingSetNodeID &ID) {
>> -  Profile(ID, getAnalysisContext(), getParent(), Enter);
>> +  Profile(ID, getAnalysisDeclContext(), getParent(), Enter);
>>  }
>>
>>  void BlockInvocationContext::Profile(llvm::FoldingSetNodeID &ID) {
>> -  Profile(ID, getAnalysisContext(), getParent(), BD);
>> +  Profile(ID, getAnalysisDeclContext(), getParent(), BD);
>>  }
>>
>>
>>  //===----------------------------------------------------------------------===//
>> @@ -239,7 +239,7 @@
>>
>>  template <typename LOC, typename DATA>
>>  const LOC*
>> -LocationContextManager::getLocationContext(AnalysisContext *ctx,
>> +LocationContextManager::getLocationContext(AnalysisDeclContext *ctx,
>>                                            const LocationContext *parent,
>>                                            const DATA *d) {
>>   llvm::FoldingSetNodeID ID;
>> @@ -256,7 +256,7 @@
>>  }
>>
>>  const StackFrameContext*
>> -LocationContextManager::getStackFrame(AnalysisContext *ctx,
>> +LocationContextManager::getStackFrame(AnalysisDeclContext *ctx,
>>                                       const LocationContext *parent,
>>                                       const Stmt *s,
>>                                       const CFGBlock *blk, unsigned idx) {
>> @@ -273,7 +273,7 @@
>>  }
>>
>>  const ScopeContext *
>> -LocationContextManager::getScope(AnalysisContext *ctx,
>> +LocationContextManager::getScope(AnalysisDeclContext *ctx,
>>                                  const LocationContext *parent,
>>                                  const Stmt *s) {
>>   return getLocationContext<ScopeContext, Stmt>(ctx, parent, s);
>> @@ -395,9 +395,9 @@
>>   return BV;
>>  }
>>
>> -std::pair<AnalysisContext::referenced_decls_iterator,
>> -          AnalysisContext::referenced_decls_iterator>
>> -AnalysisContext::getReferencedBlockVars(const BlockDecl *BD) {
>> +std::pair<AnalysisDeclContext::referenced_decls_iterator,
>> +          AnalysisDeclContext::referenced_decls_iterator>
>> +AnalysisDeclContext::getReferencedBlockVars(const BlockDecl *BD) {
>>   if (!ReferencedBlockVars)
>>     ReferencedBlockVars = new llvm::DenseMap<const BlockDecl*,void*>();
>>
>> @@ -405,7 +405,7 @@
>>   return std::make_pair(V->begin(), V->end());
>>  }
>>
>> -ManagedAnalysis *&AnalysisContext::getAnalysisImpl(const void *tag) {
>> +ManagedAnalysis *&AnalysisDeclContext::getAnalysisImpl(const void *tag) {
>>   if (!ManagedAnalyses)
>>     ManagedAnalyses = new ManagedAnalysisMap();
>>   ManagedAnalysisMap *M = (ManagedAnalysisMap*) ManagedAnalyses;
>> @@ -418,7 +418,7 @@
>>
>>  ManagedAnalysis::~ManagedAnalysis() {}
>>
>> -AnalysisContext::~AnalysisContext() {
>> +AnalysisDeclContext::~AnalysisDeclContext() {
>>   delete forcedBlkExprs;
>>   delete ReferencedBlockVars;
>>   // Release the managed analyses.
>> @@ -430,7 +430,7 @@
>>   }
>>  }
>>
>> -AnalysisContextManager::~AnalysisContextManager() {
>> +AnalysisDeclContextManager::~AnalysisDeclContextManager() {
>>   for (ContextMap::iterator I = Contexts.begin(), E = Contexts.end();
>> I!=E; ++I)
>>     delete I->second;
>>  }
>>
>> Modified: cfe/trunk/lib/Analysis/CMakeLists.txt
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CMakeLists.txt?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/CMakeLists.txt (original)
>> +++ cfe/trunk/lib/Analysis/CMakeLists.txt Sun Oct 23 20:32:45 2011
>> @@ -1,7 +1,7 @@
>>  set(LLVM_USED_LIBS clangBasic clangAST clangIndex)
>>
>>  add_clang_library(clangAnalysis
>> -  AnalysisContext.cpp
>> +  AnalysisDeclContext.cpp
>>   CFG.cpp
>>   CFGReachabilityAnalysis.cpp
>>   CFGStmtMap.cpp
>>
>> Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/LiveVariables.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
>> +++ cfe/trunk/lib/Analysis/LiveVariables.cpp Sun Oct 23 20:32:45 2011
>> @@ -22,7 +22,7 @@
>>   llvm::BitVector enqueuedBlocks;
>>   PostOrderCFGView *POV;
>>  public:
>> -  DataflowWorklist(const CFG &cfg, AnalysisContext &Ctx)
>> +  DataflowWorklist(const CFG &cfg, AnalysisDeclContext &Ctx)
>>     : enqueuedBlocks(cfg.getNumBlockIDs()),
>>       POV(Ctx.getAnalysis<PostOrderCFGView>()) {}
>>
>> @@ -86,7 +86,7 @@
>>  namespace {
>>  class LiveVariablesImpl {
>>  public:
>> -  AnalysisContext &analysisContext;
>> +  AnalysisDeclContext &analysisContext;
>>   std::vector<LiveVariables::LivenessValues> cfgBlockValues;
>>   llvm::ImmutableSet<const Stmt *>::Factory SSetFact;
>>   llvm::ImmutableSet<const VarDecl *>::Factory DSetFact;
>> @@ -106,7 +106,7 @@
>>
>>   void dumpBlockLiveness(const SourceManager& M);
>>
>> -  LiveVariablesImpl(AnalysisContext &ac, bool KillAtAssign)
>> +  LiveVariablesImpl(AnalysisDeclContext &ac, bool KillAtAssign)
>>     : analysisContext(ac),
>>       SSetFact(false), // Do not canonicalize ImmutableSets by default.
>>       DSetFact(false), // This is a *major* performance win.
>> @@ -323,7 +323,7 @@
>>  }
>>
>>  void TransferFunctions::VisitBlockExpr(BlockExpr *BE) {
>> -  AnalysisContext::referenced_decls_iterator I, E;
>> +  AnalysisDeclContext::referenced_decls_iterator I, E;
>>   llvm::tie(I, E) =
>>     LV.analysisContext.getReferencedBlockVars(BE->getBlockDecl());
>>   for ( ; I != E ; ++I) {
>> @@ -447,7 +447,7 @@
>>  }
>>
>>  LiveVariables *
>> -LiveVariables::computeLiveness(AnalysisContext &AC,
>> +LiveVariables::computeLiveness(AnalysisDeclContext &AC,
>>                                  bool killAtAssign) {
>>
>>   // No CFG?  Bail out.
>>
>> Modified: cfe/trunk/lib/Analysis/PostOrderCFGView.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/PostOrderCFGView.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/PostOrderCFGView.cpp (original)
>> +++ cfe/trunk/lib/Analysis/PostOrderCFGView.cpp Sun Oct 23 20:32:45 2011
>> @@ -26,7 +26,7 @@
>>   }
>>  }
>>
>> -PostOrderCFGView *PostOrderCFGView::create(AnalysisContext &ctx) {
>> +PostOrderCFGView *PostOrderCFGView::create(AnalysisDeclContext &ctx) {
>>   const CFG *cfg = ctx.getCFG();
>>   if (!cfg)
>>     return 0;
>>
>> Modified: cfe/trunk/lib/Analysis/ReachableCode.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ReachableCode.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/ReachableCode.cpp (original)
>> +++ cfe/trunk/lib/Analysis/ReachableCode.cpp Sun Oct 23 20:32:45 2011
>> @@ -287,7 +287,7 @@
>>   return count;
>>  }
>>
>> -void FindUnreachableCode(AnalysisContext &AC, Callback &CB) {
>> +void FindUnreachableCode(AnalysisDeclContext &AC, Callback &CB) {
>>   CFG *cfg = AC.getCFG();
>>   if (!cfg)
>>     return;
>>
>> Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ThreadSafety.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/ThreadSafety.cpp (original)
>> +++ cfe/trunk/lib/Analysis/ThreadSafety.cpp Sun Oct 23 20:32:45 2011
>> @@ -648,7 +648,7 @@
>>   Lockset addLock(Lockset &LSet, Expr *MutexExp, const NamedDecl *D,
>>                   LockKind LK, SourceLocation Loc);
>>
>> -  void runAnalysis(AnalysisContext &AC);
>> +  void runAnalysis(AnalysisDeclContext &AC);
>>  };
>>
>>  /// \brief Compute the intersection of two locksets and issue warnings
>> for any
>> @@ -710,7 +710,7 @@
>>  /// We traverse the blocks in the CFG, compute the set of mutexes that
>> are held
>>  /// at the end of each block, and issue warnings for thread safety
>> violations.
>>  /// Each block in the CFG is traversed exactly once.
>> -void ThreadSafetyAnalyzer::runAnalysis(AnalysisContext &AC) {
>> +void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
>>   CFG *CFGraph = AC.getCFG();
>>   if (!CFGraph) return;
>>   const NamedDecl *D = dyn_cast_or_null<NamedDecl>(AC.getDecl());
>> @@ -869,7 +869,7 @@
>>  /// We traverse the blocks in the CFG, compute the set of mutexes that
>> are held
>>  /// at the end of each block, and issue warnings for thread safety
>> violations.
>>  /// Each block in the CFG is traversed exactly once.
>> -void runThreadSafetyAnalysis(AnalysisContext &AC,
>> +void runThreadSafetyAnalysis(AnalysisDeclContext &AC,
>>                              ThreadSafetyHandler &Handler) {
>>   ThreadSafetyAnalyzer Analyzer(Handler);
>>   Analyzer.runAnalysis(AC);
>>
>> Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UninitializedValues.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Analysis/UninitializedValues.cpp (original)
>> +++ cfe/trunk/lib/Analysis/UninitializedValues.cpp Sun Oct 23 20:32:45
>> 2011
>> @@ -337,7 +337,7 @@
>>  class TransferFunctions : public StmtVisitor<TransferFunctions> {
>>   CFGBlockValues &vals;
>>   const CFG &cfg;
>> -  AnalysisContext ∾
>> +  AnalysisDeclContext ∾
>>   UninitVariablesHandler *handler;
>>
>>   /// The last DeclRefExpr seen when analyzing a block.  Used to
>> @@ -356,7 +356,7 @@
>>
>>  public:
>>   TransferFunctions(CFGBlockValues &vals, const CFG &cfg,
>> -                    AnalysisContext &ac,
>> +                    AnalysisDeclContext &ac,
>>                     UninitVariablesHandler *handler)
>>     : vals(vals), cfg(cfg), ac(ac), handler(handler),
>>       lastDR(0), lastLoad(0),
>> @@ -615,7 +615,7 @@
>>
>>  //====------------------------------------------------------------------------//
>>
>>  static bool runOnBlock(const CFGBlock *block, const CFG &cfg,
>> -                       AnalysisContext &ac, CFGBlockValues &vals,
>> +                       AnalysisDeclContext &ac, CFGBlockValues &vals,
>>                        llvm::BitVector &wasAnalyzed,
>>                        UninitVariablesHandler *handler = 0) {
>>
>> @@ -672,7 +672,7 @@
>>  void clang::runUninitializedVariablesAnalysis(
>>     const DeclContext &dc,
>>     const CFG &cfg,
>> -    AnalysisContext &ac,
>> +    AnalysisDeclContext &ac,
>>     UninitVariablesHandler &handler,
>>     UninitVariablesAnalysisStats &stats) {
>>   CFGBlockValues vals(cfg);
>>
>> Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)
>> +++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Sun Oct 23 20:32:45 2011
>> @@ -63,7 +63,7 @@
>>  }
>>
>>  /// CheckUnreachable - Check for unreachable code.
>> -static void CheckUnreachable(Sema &S, AnalysisContext &AC) {
>> +static void CheckUnreachable(Sema &S, AnalysisDeclContext &AC) {
>>   UnreachableCodeHandler UC(S);
>>   reachable_code::FindUnreachableCode(AC, UC);
>>  }
>> @@ -89,7 +89,7 @@
>>  /// return.  We assume NeverFallThrough iff we never fall off the end of
>> the
>>  /// statement but we may return.  We assume that functions not marked
>> noreturn
>>  /// will return.
>> -static ControlFlowKind CheckFallThrough(AnalysisContext &AC) {
>> +static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) {
>>   CFG *cfg = AC.getCFG();
>>   if (cfg == 0) return UnknownFallThrough;
>>
>> @@ -312,7 +312,7 @@
>>  static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt
>> *Body,
>>                                     const BlockExpr *blkExpr,
>>                                     const CheckFallThroughDiagnostics& CD,
>> -                                    AnalysisContext &AC) {
>> +                                    AnalysisDeclContext &AC) {
>>
>>   bool ReturnsVoid = false;
>>   bool HasNoReturn = false;
>> @@ -830,7 +830,7 @@
>>   const Stmt *Body = D->getBody();
>>   assert(Body);
>>
>> -  AnalysisContext AC(/* AnalysisContextManager */ 0,  D, 0);
>> +  AnalysisDeclContext AC(/* AnalysisDeclContextManager */ 0,  D, 0);
>>
>>   // Don't generate EH edges for CallExprs as we'd like to avoid the n^2
>>   // explosion for destrutors that can result and the compile time hit.
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
>> (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp Sun Oct
>> 23 20:32:45 2011
>> @@ -54,7 +54,7 @@
>>
>>   // Get the CFG and the Decl of this block
>>   C = LC->getCFG();
>> -  D = LC->getAnalysisContext()->getDecl();
>> +  D = LC->getAnalysisDeclContext()->getDecl();
>>
>>   unsigned total = 0, unreachable = 0;
>>
>>
>> Modified:
>> cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
>> (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp Sun
>> Oct 23 20:32:45 2011
>> @@ -36,14 +36,14 @@
>>  namespace {
>>  class WalkAST : public StmtVisitor<WalkAST> {
>>   BugReporter &BR;
>> -  AnalysisContext* AC;
>> +  AnalysisDeclContext* AC;
>>   enum { num_setids = 6 };
>>   IdentifierInfo *II_setid[num_setids];
>>
>>   const bool CheckRand;
>>
>>  public:
>> -  WalkAST(BugReporter &br, AnalysisContext* ac)
>> +  WalkAST(BugReporter &br, AnalysisDeclContext* ac)
>>   : BR(br), AC(ac), II_setid(),
>>     CheckRand(isArc4RandomAvailable(BR.getContext())) {}
>>
>> @@ -611,7 +611,7 @@
>>  public:
>>   void checkASTCodeBody(const Decl *D, AnalysisManager& mgr,
>>                         BugReporter &BR) const {
>> -    WalkAST walker(BR, mgr.getAnalysisContext(D));
>> +    WalkAST walker(BR, mgr.getAnalysisDeclContext(D));
>>     walker.Visit(D->getBody());
>>   }
>>  };
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
>> (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp Sun Oct
>> 23 20:32:45 2011
>> @@ -24,10 +24,10 @@
>>  namespace {
>>  class WalkAST : public StmtVisitor<WalkAST> {
>>   BugReporter &BR;
>> -  AnalysisContext* AC;
>> +  AnalysisDeclContext* AC;
>>
>>  public:
>> -  WalkAST(BugReporter &br, AnalysisContext* ac) : BR(br), AC(ac) {}
>> +  WalkAST(BugReporter &br, AnalysisDeclContext* ac) : BR(br), AC(ac) {}
>>   void VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E);
>>   void VisitStmt(Stmt *S) { VisitChildren(S); }
>>   void VisitChildren(Stmt *S);
>> @@ -80,7 +80,7 @@
>>  public:
>>   void checkASTCodeBody(const Decl *D, AnalysisManager& mgr,
>>                         BugReporter &BR) const {
>> -    WalkAST walker(BR, mgr.getAnalysisContext(D));
>> +    WalkAST walker(BR, mgr.getAnalysisDeclContext(D));
>>     walker.Visit(D->getBody());
>>   }
>>  };
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp Sun Oct 23
>> 20:32:45 2011
>> @@ -72,7 +72,7 @@
>>   const CFG &cfg;
>>   ASTContext &Ctx;
>>   BugReporter& BR;
>> -  AnalysisContext* AC;
>> +  AnalysisDeclContext* AC;
>>   ParentMap& Parents;
>>   llvm::SmallPtrSet<const VarDecl*, 20> Escaped;
>>   llvm::OwningPtr<ReachableCode> reachableCode;
>> @@ -82,7 +82,7 @@
>>
>>  public:
>>   DeadStoreObs(const CFG &cfg, ASTContext &ctx,
>> -               BugReporter& br, AnalysisContext* ac, ParentMap& parents,
>> +               BugReporter& br, AnalysisDeclContext* ac, ParentMap&
>> parents,
>>                llvm::SmallPtrSet<const VarDecl*, 20> &escaped)
>>     : cfg(cfg), Ctx(ctx), BR(br), AC(ac), Parents(parents),
>>       Escaped(escaped), currentBlock(0) {}
>> @@ -350,7 +350,7 @@
>>                         BugReporter &BR) const {
>>     if (LiveVariables *L = mgr.getAnalysis<LiveVariables>(D)) {
>>       CFG &cfg = *mgr.getCFG(D);
>> -      AnalysisContext *AC = mgr.getAnalysisContext(D);
>> +      AnalysisDeclContext *AC = mgr.getAnalysisDeclContext(D);
>>       ParentMap &pmap = mgr.getParentMap(D);
>>       FindEscaped FS(&cfg);
>>       FS.getCFG().VisitBlockStmts(FS);
>>
>> Modified:
>> cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
>> (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
>> Sun Oct 23 20:32:45 2011
>> @@ -82,16 +82,16 @@
>>
>>   // False positive reduction methods
>>   static bool isSelfAssign(const Expr *LHS, const Expr *RHS);
>> -  static bool isUnused(const Expr *E, AnalysisContext *AC);
>> +  static bool isUnused(const Expr *E, AnalysisDeclContext *AC);
>>   static bool isTruncationExtensionAssignment(const Expr *LHS,
>>                                               const Expr *RHS);
>> -  static bool pathWasCompletelyAnalyzed(AnalysisContext *AC,
>> +  static bool pathWasCompletelyAnalyzed(AnalysisDeclContext *AC,
>>                                         const CFGBlock *CB,
>>                                         const CoreEngine &CE);
>>   static bool CanVary(const Expr *Ex,
>> -                      AnalysisContext *AC);
>> +                      AnalysisDeclContext *AC);
>>   static bool isConstantOrPseudoConstant(const DeclRefExpr *DR,
>> -                                         AnalysisContext *AC);
>> +                                         AnalysisDeclContext *AC);
>>   static bool containsNonLocalVarDecl(const Stmt *S);
>>
>>   // Hash table and related data structures
>> @@ -116,7 +116,7 @@
>>   // been created yet.
>>   BinaryOperatorData &Data = hash[B];
>>   Assumption &A = Data.assumption;
>> -  AnalysisContext *AC = C.getCurrentAnalysisContext();
>> +  AnalysisDeclContext *AC = C.getCurrentAnalysisDeclContext();
>>
>>   // If we already have visited this node on a path that does not contain
>> an
>>   // idempotent operation, return immediately.
>> @@ -366,8 +366,8 @@
>>     // warning
>>     if (Eng.hasWorkRemaining()) {
>>       // If we can trace back
>> -      AnalysisContext *AC = (*ES.begin())->getLocationContext()
>> -                                         ->getAnalysisContext();
>> +      AnalysisDeclContext *AC = (*ES.begin())->getLocationContext()
>> +                                         ->getAnalysisDeclContext();
>>       if (!pathWasCompletelyAnalyzed(AC,
>>                                      AC->getCFGStmtMap()->getBlock(B),
>>                                      Eng.getCoreEngine()))
>> @@ -487,7 +487,7 @@
>>  // Returns true if the Expr points to a VarDecl that is not read anywhere
>>  // outside of self-assignments.
>>  bool IdempotentOperationChecker::isUnused(const Expr *E,
>> -                                          AnalysisContext *AC) {
>> +                                          AnalysisDeclContext *AC) {
>>   if (!E)
>>     return false;
>>
>> @@ -531,7 +531,7 @@
>>  // Returns false if a path to this block was not completely analyzed, or
>> true
>>  // otherwise.
>>  bool
>> -IdempotentOperationChecker::pathWasCompletelyAnalyzed(AnalysisContext
>> *AC,
>> +IdempotentOperationChecker::pathWasCompletelyAnalyzed(AnalysisDeclContext
>> *AC,
>>                                                       const CFGBlock *CB,
>>                                                       const CoreEngine
>> &CE) {
>>
>> @@ -615,7 +615,7 @@
>>  // expression may also involve a variable that behaves like a constant.
>> The
>>  // function returns true if the expression varies, and false otherwise.
>>  bool IdempotentOperationChecker::CanVary(const Expr *Ex,
>> -                                         AnalysisContext *AC) {
>> +                                         AnalysisDeclContext *AC) {
>>   // Parentheses and casts are irrelevant here
>>   Ex = Ex->IgnoreParenCasts();
>>
>> @@ -699,7 +699,7 @@
>>  // Returns true if a DeclRefExpr is or behaves like a constant.
>>  bool IdempotentOperationChecker::isConstantOrPseudoConstant(
>>                                                           const
>> DeclRefExpr *DR,
>> -                                                          AnalysisContext
>> *AC) {
>> +
>>  AnalysisDeclContext *AC) {
>>   // Check if the type of the Decl is const-qualified
>>   if (DR->getType().isConstQualified())
>>     return true;
>>
>> Modified:
>> cfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> ---
>> cfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
>> (original)
>> +++
>> cfe/trunk/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp Sun
>> Oct 23 20:32:45 2011
>> @@ -205,7 +205,7 @@
>>
>>   // Delete any possible overflows which have a comparison.
>>   CheckOverflowOps c(PossibleMallocOverflows, BR.getContext());
>> -  c.Visit(mgr.getAnalysisContext(D)->getBody());
>> +  c.Visit(mgr.getAnalysisDeclContext(D)->getBody());
>>
>>   // Output warnings for all overflows that are left.
>>   for (CheckOverflowOps::theVecType::iterator
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
>> (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp Sun Oct
>> 23 20:32:45 2011
>> @@ -194,7 +194,7 @@
>>
>>   // FIXME: A callback should disable checkers at the start of functions.
>>   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
>> -
>> C.getCurrentAnalysisContext()->getDecl())))
>> +
>> C.getCurrentAnalysisDeclContext()->getDecl())))
>>     return;
>>
>>   if (isInitMessage(msg)) {
>> @@ -221,7 +221,7 @@
>>                                         CheckerContext &C) const {
>>   // FIXME: A callback should disable checkers at the start of functions.
>>   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
>> -
>> C.getCurrentAnalysisContext()->getDecl())))
>> +
>> C.getCurrentAnalysisDeclContext()->getDecl())))
>>     return;
>>
>>   checkForInvalidSelf(E->getBase(), C,
>> @@ -233,7 +233,7 @@
>>                                        CheckerContext &C) const {
>>   // FIXME: A callback should disable checkers at the start of functions.
>>   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
>> -
>> C.getCurrentAnalysisContext()->getDecl())))
>> +
>> C.getCurrentAnalysisDeclContext()->getDecl())))
>>     return;
>>
>>   checkForInvalidSelf(S->getRetValue(), C,
>> @@ -335,7 +335,7 @@
>>
>>  /// \brief Returns true if the location is 'self'.
>>  static bool isSelfVar(SVal location, CheckerContext &C) {
>> -  AnalysisContext *analCtx = C.getCurrentAnalysisContext();
>> +  AnalysisDeclContext *analCtx = C.getCurrentAnalysisDeclContext();
>>   if (!analCtx->getSelfDecl())
>>     return false;
>>   if (!isa<loc::MemRegionVal>(location))
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
>> (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp Sun
>> Oct 23 20:32:45 2011
>> @@ -69,7 +69,7 @@
>>
>>     // Save the CFG if we don't have it already
>>     if (!C)
>> -      C = LC->getAnalysisContext()->getUnoptimizedCFG();
>> +      C = LC->getAnalysisDeclContext()->getUnoptimizedCFG();
>>     if (!PM)
>>       PM = &LC->getParentMap();
>>
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp Sun Oct 23
>> 20:32:45 2011
>> @@ -66,8 +66,8 @@
>>  }
>>
>>
>> -AnalysisContext *
>> -AnalysisManager::getAnalysisContextInAnotherTU(const Decl *D) {
>> +AnalysisDeclContext *
>> +AnalysisManager::getAnalysisDeclContextInAnotherTU(const Decl *D) {
>>   idx::Entity Ent = idx::Entity::get(const_cast<Decl *>(D),
>>                                      Idxer->getProgram());
>>   FunctionDecl *FuncDef;
>> @@ -77,7 +77,7 @@
>>   if (FuncDef == 0)
>>     return 0;
>>
>> -  // This AnalysisContext wraps function definition in another
>> translation unit.
>> +  // This AnalysisDeclContext wraps function definition in another
>> translation unit.
>>   // But it is still owned by the AnalysisManager associated with the
>> current
>>   // translation unit.
>>   return AnaCtxMgr.getContext(FuncDef, TU);
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp Sun Oct 23 20:32:45
>> 2011
>> @@ -725,8 +725,8 @@
>>     ExprEngine NewEng(AMgr, GCEnabled);
>>
>>     // Create the new LocationContext.
>> -    AnalysisContext *NewAnaCtx =
>> -      AMgr.getAnalysisContext(CalleeCtx->getDecl(),
>> +    AnalysisDeclContext *NewAnaCtx =
>> +      AMgr.getAnalysisDeclContext(CalleeCtx->getDecl(),
>>                               CalleeCtx->getTranslationUnit());
>>
>>     const StackFrameContext *OldLocCtx = CalleeCtx;
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Sun Oct 23 20:32:45
>> 2011
>> @@ -53,7 +53,7 @@
>>
>>  ExprEngine::ExprEngine(AnalysisManager &mgr, bool gcEnabled)
>>   : AMgr(mgr),
>> -    AnalysisContexts(mgr.getAnalysisContextManager()),
>> +    AnalysisDeclContexts(mgr.getAnalysisDeclContextManager()),
>>     Engine(*this),
>>     G(Engine.getGraph()),
>>     Builder(NULL),
>> @@ -1509,7 +1509,7 @@
>>   // Check if the function definition is in the same translation unit.
>>   if (FD->hasBody(FD)) {
>>     const StackFrameContext *stackFrame =
>> -      AMgr.getStackFrame(AMgr.getAnalysisContext(FD),
>> +      AMgr.getStackFrame(AMgr.getAnalysisDeclContext(FD),
>>                          Pred->getLocationContext(),
>>                          CE, Builder->getBlock(), Builder->getIndex());
>>     // Now we have the definition of the callee, create a CallEnter node.
>> @@ -1522,7 +1522,7 @@
>>
>>   // Check if we can find the function definition in other translation
>> units.
>>   if (AMgr.hasIndexer()) {
>> -    AnalysisContext *C = AMgr.getAnalysisContextInAnotherTU(FD);
>> +    AnalysisDeclContext *C = AMgr.getAnalysisDeclContextInAnotherTU(FD);
>>     if (C == 0)
>>       return false;
>>     const StackFrameContext *stackFrame =
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp Sun Oct 23
>> 20:32:45 2011
>> @@ -224,7 +224,7 @@
>>
>>   // Create the context for 'this' region.
>>   const StackFrameContext *SFC =
>> -    AnalysisContexts.getContext(DD)->
>> +    AnalysisDeclContexts.getContext(DD)->
>>       getStackFrame(Pred->getLocationContext(), S,
>>                     Builder->getBlock(), Builder->getIndex());
>>
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Sun Oct 23 20:32:45
>> 2011
>> @@ -337,7 +337,7 @@
>>
>>  void BlockTextRegion::ProfileRegion(llvm::FoldingSetNodeID& ID,
>>                                     const BlockDecl *BD, CanQualType,
>> -                                    const AnalysisContext *AC,
>> +                                    const AnalysisDeclContext *AC,
>>                                     const MemRegion*) {
>>   ID.AddInteger(MemRegion::BlockTextRegionKind);
>>   ID.AddPointer(BD);
>> @@ -590,7 +590,7 @@
>>           const BlockTextRegion *BTR =
>>             getBlockTextRegion(BD,
>>
>>  C.getCanonicalType(BD->getSignatureAsWritten()->getType()),
>> -                     STC->getAnalysisContext());
>> +                     STC->getAnalysisDeclContext());
>>           sReg = getGlobalsRegion(BTR);
>>         }
>>         else {
>> @@ -678,7 +678,7 @@
>>
>>  const BlockTextRegion *
>>  MemRegionManager::getBlockTextRegion(const BlockDecl *BD, CanQualType
>> locTy,
>> -                                     AnalysisContext *AC) {
>> +                                     AnalysisDeclContext *AC) {
>>   return getSubRegion<BlockTextRegion>(BD, locTy, AC, getCodeRegion());
>>  }
>>
>> @@ -928,8 +928,8 @@
>>   if (ReferencedVars)
>>     return;
>>
>> -  AnalysisContext *AC = getCodeRegion()->getAnalysisContext();
>> -  AnalysisContext::referenced_decls_iterator I, E;
>> +  AnalysisDeclContext *AC = getCodeRegion()->getAnalysisDeclContext();
>> +  AnalysisDeclContext::referenced_decls_iterator I, E;
>>   llvm::tie(I, E) = AC->getReferencedBlockVars(BC->getDecl());
>>
>>   if (I == E) {
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp Sun Oct 23
>> 20:32:45 2011
>> @@ -94,9 +94,9 @@
>>
>>  //===----------------------------------------------------------------------===//
>>
>>  static SourceLocation getValidSourceLocation(const Stmt* S,
>> -                                             LocationOrAnalysisContext
>> LAC) {
>> +
>> LocationOrAnalysisDeclContext LAC) {
>>   SourceLocation L = S->getLocStart();
>> -  assert(!LAC.isNull() && "A valid LocationContext or AnalysisContext
>> should "
>> +  assert(!LAC.isNull() && "A valid LocationContext or AnalysisDeclContext
>> should "
>>                           "be passed to PathDiagnosticLocation upon
>> creation.");
>>
>>   // S might be a temporary statement that does not have a location in the
>> @@ -107,7 +107,7 @@
>>     if (LAC.is<const LocationContext*>())
>>       PM = &LAC.get<const LocationContext*>()->getParentMap();
>>     else
>> -      PM = &LAC.get<AnalysisContext*>()->getParentMap();
>> +      PM = &LAC.get<AnalysisDeclContext*>()->getParentMap();
>>
>>     while (!L.isValid()) {
>>       S = PM->getParent(S);
>> @@ -127,7 +127,7 @@
>>  PathDiagnosticLocation
>>   PathDiagnosticLocation::createBegin(const Stmt *S,
>>                                       const SourceManager &SM,
>> -                                      LocationOrAnalysisContext LAC) {
>> +                                      LocationOrAnalysisDeclContext LAC)
>> {
>>   return PathDiagnosticLocation(getValidSourceLocation(S, LAC),
>>                                 SM, SingleLocK);
>>  }
>> @@ -229,7 +229,7 @@
>>
>>  FullSourceLoc
>>   PathDiagnosticLocation::genLocation(SourceLocation L,
>> -                                      LocationOrAnalysisContext LAC)
>> const {
>> +                                      LocationOrAnalysisDeclContext LAC)
>> const {
>>   assert(isValid());
>>   // Note that we want a 'switch' here so that the compiler can warn us in
>>   // case we add more cases.
>> @@ -248,7 +248,7 @@
>>  }
>>
>>  PathDiagnosticRange
>> -  PathDiagnosticLocation::genRange(LocationOrAnalysisContext LAC) const {
>> +  PathDiagnosticLocation::genRange(LocationOrAnalysisDeclContext LAC)
>> const {
>>   assert(isValid());
>>   // Note that we want a 'switch' here so that the compiler can warn us in
>>   // case we add more cases.
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp Sun Oct 23 20:32:45
>> 2011
>> @@ -155,7 +155,7 @@
>>                                          CanQualType locTy,
>>                                          const LocationContext
>> *locContext) {
>>   const BlockTextRegion *BC =
>> -    MemMgr.getBlockTextRegion(block, locTy,
>> locContext->getAnalysisContext());
>> +    MemMgr.getBlockTextRegion(block, locTy,
>> locContext->getAnalysisDeclContext());
>>   const BlockDataRegion *BD = MemMgr.getBlockDataRegion(BC, locContext);
>>   return loc::MemRegionVal(BD);
>>  }
>>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Sun Oct 23
>> 20:32:45 2011
>> @@ -278,7 +278,7 @@
>>   if (!Opts.AnalyzeAll && !SM.isFromMainFile(SL))
>>     return;
>>
>> -  // Clear the AnalysisManager of old AnalysisContexts.
>> +  // Clear the AnalysisManager of old AnalysisDeclContexts.
>>   Mgr->ClearContexts();
>>
>>   // Dispatch on the actions.
>> @@ -318,7 +318,7 @@
>>   }
>>
>>   // Execute the worklist algorithm.
>> -  Eng.ExecuteWorkList(mgr.getAnalysisContextManager().getStackFrame(D,
>> 0),
>> +
>>  Eng.ExecuteWorkList(mgr.getAnalysisDeclContextManager().getStackFrame(D,
>> 0),
>>                       mgr.getMaxNodes());
>>
>>   // Release the auditor (if any) so that it doesn't monitor the graph
>>
>> Modified: cfe/trunk/test/Analysis/inline3.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inline3.c?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/Analysis/inline3.c (original)
>> +++ cfe/trunk/test/Analysis/inline3.c Sun Oct 23 20:32:45 2011
>> @@ -1,6 +1,6 @@
>>  // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-inline-call
>> -analyzer-store region -verify %s
>>
>> -// Test when entering f1(), we set the right AnalysisContext to
>> Environment.
>> +// Test when entering f1(), we set the right AnalysisDeclContext to
>> Environment.
>>  // Otherwise, block-level expr '1 && a' would not be block-level.
>>  int a;
>>
>>
>> Modified: cfe/trunk/test/SemaCXX/missing-header.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/missing-header.cpp?rev=142782&r1=142781&r2=142782&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/SemaCXX/missing-header.cpp (original)
>> +++ cfe/trunk/test/SemaCXX/missing-header.cpp Sun Oct 23 20:32:45 2011
>> @@ -2,8 +2,8 @@
>>
>>  #include "not exist" // expected-error{{'not exist' file not found}}
>>
>> -class AnalysisContext {};
>> -static ControlFlowKind CheckFallThrough(AnalysisContext &AC) {
>> +class AnalysisDeclContext {};
>> +static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) {
>>   if (const AsmStmt *AS = dyn_cast<AsmStmt>(S)) {}
>>   bool NoReturnEdge = false;
>>  }
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111023/b5e28826/attachment.html>


More information about the cfe-commits mailing list