Fixing 80 col violations (& removing any trailing whitespace on files I was touching anyway)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144171 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h
index 1c7f075..a204d83 100644
--- a/include/clang/Analysis/AnalysisContext.h
+++ b/include/clang/Analysis/AnalysisContext.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines AnalysisDeclContext, a class that manages the analysis context
-// data for path sensitive analysis.
+// This file defines AnalysisDeclContext, a class that manages the analysis
+// context data for path sensitive analysis.
//
//===----------------------------------------------------------------------===//
@@ -39,7 +39,7 @@
class LocationContextManager;
class StackFrameContext;
class AnalysisDeclContextManager;
-class LocationContext;
+class LocationContext;
namespace idx { class TranslationUnit; }
@@ -50,7 +50,7 @@
ManagedAnalysis() {}
public:
virtual ~ManagedAnalysis();
-
+
// Subclasses need to implement:
//
// static const void *getTag();
@@ -62,15 +62,15 @@
//
// which creates the analysis object given an AnalysisDeclContext.
};
-
-
-/// AnalysisDeclContext contains the context data for the function or method under
-/// analysis.
+
+
+/// AnalysisDeclContext contains the context data for the function or method
+/// under analysis.
class AnalysisDeclContext {
- /// Backpoint to the AnalysisManager object that created this AnalysisDeclContext.
- /// This may be null.
+ /// Backpoint to the AnalysisManager object that created this
+ /// AnalysisDeclContext. This may be null.
AnalysisDeclContextManager *Manager;
-
+
const Decl *D;
// TranslationUnit is NULL if we don't have multiple translation units.
@@ -81,7 +81,7 @@
CFG::BuildOptions cfgBuildOptions;
CFG::BuildOptions::ForcedBlkExprs *forcedBlkExprs;
-
+
bool builtCFG, builtCompleteCFG;
llvm::OwningPtr<LiveVariables> liveness;
@@ -122,12 +122,12 @@
const CFG::BuildOptions &getCFGBuildOptions() const {
return cfgBuildOptions;
}
-
+
/// 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 cfgBuildOptions.AddEHEdges; }
+ bool getAddEHEdges() const { return cfgBuildOptions.AddEHEdges; }
bool getUseUnoptimizedCFG() const {
return !cfgBuildOptions.PruneTriviallyFalseEdges;
}
@@ -136,14 +136,14 @@
void registerForcedBlockExpression(const Stmt *stmt);
const CFGBlock *getBlockForRegisteredExpression(const Stmt *stmt);
-
+
Stmt *getBody() const;
CFG *getCFG();
-
+
CFGStmtMap *getCFGStmtMap();
CFGReverseBlockReachabilityAnalysis *getCFGReachablityAnalysis();
-
+
/// Return a version of the CFG without any edges pruned.
CFG *getUnoptimizedCFG();
@@ -165,12 +165,12 @@
/// Return the ImplicitParamDecl* associated with 'self' if this
/// AnalysisDeclContext wraps an ObjCMethodDecl. Returns NULL otherwise.
const ImplicitParamDecl *getSelfDecl() const;
-
+
const StackFrameContext *getStackFrame(LocationContext const *Parent,
const Stmt *S,
const CFGBlock *Blk,
- unsigned Idx);
-
+ unsigned Idx);
+
/// Return the specified analysis object, lazily running the analysis if
/// necessary. Return NULL if the analysis could not run.
template <typename T>
@@ -184,7 +184,7 @@
}
private:
ManagedAnalysis *&getAnalysisImpl(const void* tag);
-
+
LocationContextManager &getLocationContextManager();
};
@@ -195,7 +195,8 @@
private:
ContextKind Kind;
- // AnalysisDeclContext can't be const since some methods may modify its member.
+ // AnalysisDeclContext can't be const since some methods may modify its
+ // member.
AnalysisDeclContext *Ctx;
const LocationContext *Parent;
@@ -212,8 +213,8 @@
AnalysisDeclContext *getAnalysisDeclContext() const { return Ctx; }
- idx::TranslationUnit *getTranslationUnit() const {
- return Ctx->getTranslationUnit();
+ idx::TranslationUnit *getTranslationUnit() const {
+ return Ctx->getTranslationUnit();
}
const LocationContext *getParent() const { return Parent; }
@@ -265,7 +266,7 @@
friend class LocationContextManager;
StackFrameContext(AnalysisDeclContext *ctx, const LocationContext *parent,
- const Stmt *s, const CFGBlock *blk,
+ const Stmt *s, const CFGBlock *blk,
unsigned idx)
: LocationContext(StackFrame, ctx, parent), CallSite(s),
Block(blk), Index(idx) {}
@@ -324,7 +325,8 @@
friend class LocationContextManager;
- BlockInvocationContext(AnalysisDeclContext *ctx, const LocationContext *parent,
+ BlockInvocationContext(AnalysisDeclContext *ctx,
+ const LocationContext *parent,
const BlockDecl *bd)
: LocationContext(Block, ctx, parent), BD(bd) {}
@@ -370,28 +372,28 @@
class AnalysisDeclContextManager {
typedef llvm::DenseMap<const Decl*, AnalysisDeclContext*> ContextMap;
-
+
ContextMap Contexts;
LocationContextManager LocContexts;
CFG::BuildOptions cfgBuildOptions;
-
+
public:
AnalysisDeclContextManager(bool useUnoptimizedCFG = false,
bool addImplicitDtors = false,
bool addInitializers = false);
-
+
~AnalysisDeclContextManager();
-
+
AnalysisDeclContext *getContext(const Decl *D, idx::TranslationUnit *TU = 0);
-
+
bool getUseUnoptimizedCFG() const {
return !cfgBuildOptions.PruneTriviallyFalseEdges;
}
-
+
CFG::BuildOptions &getCFGBuildOptions() {
return cfgBuildOptions;
}
-
+
const StackFrameContext *getStackFrame(AnalysisDeclContext *Ctx,
LocationContext const *Parent,
const Stmt *S,
@@ -399,15 +401,15 @@
unsigned Idx) {
return LocContexts.getStackFrame(Ctx, Parent, S, Blk, Idx);
}
-
+
// Get the top level stack frame.
- const StackFrameContext *getStackFrame(Decl const *D,
+ const StackFrameContext *getStackFrame(Decl const *D,
idx::TranslationUnit *TU) {
return LocContexts.getStackFrame(getContext(D, TU), 0, 0, 0, 0);
}
-
+
// Get a stack frame with parent.
- StackFrameContext const *getStackFrame(const Decl *D,
+ StackFrameContext const *getStackFrame(const Decl *D,
LocationContext const *Parent,
const Stmt *S,
const CFGBlock *Blk,
@@ -415,7 +417,7 @@
return LocContexts.getStackFrame(getContext(D), Parent, S, Blk, Idx);
}
-
+
/// Discard all previously created AnalysisDeclContexts.
void clear();