aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-08-12 23:37:29 +0000
committerTed Kremenek <kremenek@apple.com>2011-08-12 23:37:29 +0000
commit9c378f705405d37f49795d5e915989de774fe11f (patch)
tree22c5b5a83754bc74fdc5b45f842dd69d0f7af752
parenta40b7f2c4a968a0f35f088cd009d671389b09ac2 (diff)
Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/Analyses/LiveVariables.h10
-rw-r--r--include/clang/Analysis/AnalysisContext.h8
-rw-r--r--include/clang/Analysis/CFG.h70
-rw-r--r--include/clang/Analysis/FlowSensitive/DataflowSolver.h60
-rw-r--r--include/clang/Analysis/FlowSensitive/DataflowValues.h12
-rw-r--r--include/clang/Analysis/ProgramPoint.h56
-rw-r--r--include/clang/Analysis/Support/BlkExprDeclBitVector.h24
-rw-r--r--include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h16
-rw-r--r--include/clang/Analysis/Visitors/CFGRecStmtVisitor.h4
-rw-r--r--include/clang/Analysis/Visitors/CFGStmtVisitor.h22
-rw-r--r--include/clang/StaticAnalyzer/Checkers/LocalCheckers.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h52
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h36
-rw-r--r--include/clang/StaticAnalyzer/Core/CheckerManager.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h6
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h144
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h4
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h34
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h126
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h12
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h72
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h34
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h92
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h8
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h36
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/Store.h12
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h2
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h10
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h66
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h24
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h10
-rw-r--r--lib/Analysis/AnalysisContext.cpp2
-rw-r--r--lib/Analysis/CFG.cpp320
-rw-r--r--lib/Analysis/LiveVariables.cpp6
-rw-r--r--lib/Analysis/PseudoConstantAnalysis.cpp2
-rw-r--r--lib/Analysis/UninitializedValues.cpp10
-rw-r--r--lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp18
-rw-r--r--lib/StaticAnalyzer/Checkers/CStringChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp38
-rw-r--r--lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp16
-rw-r--r--lib/StaticAnalyzer/Checkers/ChrootChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp34
-rw-r--r--lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp6
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp8
-rw-r--r--lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp6
-rw-r--r--lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp12
-rw-r--r--lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp18
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp2
-rw-r--r--lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp4
-rw-r--r--lib/StaticAnalyzer/Core/BasicConstraintManager.cpp44
-rw-r--r--lib/StaticAnalyzer/Core/BasicValueFactory.cpp10
-rw-r--r--lib/StaticAnalyzer/Core/BlockCounter.cpp4
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp130
-rw-r--r--lib/StaticAnalyzer/Core/BugReporterVisitors.cpp24
-rw-r--r--lib/StaticAnalyzer/Core/CFRefCount.cpp224
-rw-r--r--lib/StaticAnalyzer/Core/CoreEngine.cpp88
-rw-r--r--lib/StaticAnalyzer/Core/Environment.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/ExplodedGraph.cpp20
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngine.cpp254
-rw-r--r--lib/StaticAnalyzer/Core/GRState.cpp32
-rw-r--r--lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp6
-rw-r--r--lib/StaticAnalyzer/Core/MemRegion.cpp56
-rw-r--r--lib/StaticAnalyzer/Core/PlistDiagnostics.cpp18
-rw-r--r--lib/StaticAnalyzer/Core/RangeConstraintManager.cpp40
-rw-r--r--lib/StaticAnalyzer/Core/RegionStore.cpp10
-rw-r--r--lib/StaticAnalyzer/Core/SValBuilder.cpp2
-rw-r--r--lib/StaticAnalyzer/Core/SVals.cpp8
-rw-r--r--lib/StaticAnalyzer/Core/Store.cpp4
-rw-r--r--lib/StaticAnalyzer/Core/SymbolManager.cpp42
-rw-r--r--lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp14
80 files changed, 1322 insertions, 1322 deletions
diff --git a/include/clang/Analysis/Analyses/LiveVariables.h b/include/clang/Analysis/Analyses/LiveVariables.h
index 6a1bae03be..f5d6e51e8a 100644
--- a/include/clang/Analysis/Analyses/LiveVariables.h
+++ b/include/clang/Analysis/Analyses/LiveVariables.h
@@ -57,13 +57,13 @@ public:
/// A callback invoked right before invoking the
/// liveness transfer function on the given statement.
- virtual void observeStmt(const Stmt* S,
+ virtual void observeStmt(const Stmt *S,
const CFGBlock *currentBlock,
const LivenessValues& V) {}
/// Called when the live variables analysis registers
/// that a variable is killed.
- virtual void observerKill(const DeclRefExpr* DR) {}
+ virtual void observerKill(const DeclRefExpr *DR) {}
};
@@ -75,17 +75,17 @@ public:
/// Return true if a variable is live at the end of a
/// specified block.
- bool isLive(const CFGBlock* B, const VarDecl* D);
+ bool isLive(const CFGBlock *B, const VarDecl *D);
/// Returns true if a variable is live at the beginning of the
/// the statement. This query only works if liveness information
/// has been recorded at the statement level (see runOnAllBlocks), and
/// only returns liveness information for block-level expressions.
- bool isLive(const Stmt* S, const VarDecl* D);
+ bool isLive(const Stmt *S, const VarDecl *D);
/// Returns true the block-level expression "value" is live
/// before the given block-level expression (see runOnAllBlocks).
- bool isLive(const Stmt* Loc, const Stmt* StmtVal);
+ bool isLive(const Stmt *Loc, const Stmt *StmtVal);
/// Print to stderr the liveness information associated with
/// each basic block.
diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h
index 0d4446f8ed..e3d2c8df35 100644
--- a/include/clang/Analysis/AnalysisContext.h
+++ b/include/clang/Analysis/AnalysisContext.h
@@ -221,7 +221,7 @@ public:
ContextKind ck,
AnalysisContext *ctx,
const LocationContext *parent,
- const void* data);
+ const void *data);
};
class StackFrameContext : public LocationContext {
@@ -260,7 +260,7 @@ public:
ID.AddInteger(idx);
}
- static bool classof(const LocationContext* Ctx) {
+ static bool classof(const LocationContext *Ctx) {
return Ctx->getKind() == StackFrame;
}
};
@@ -283,7 +283,7 @@ public:
ProfileCommon(ID, Scope, ctx, parent, s);
}
- static bool classof(const LocationContext* Ctx) {
+ static bool classof(const LocationContext *Ctx) {
return Ctx->getKind() == Scope;
}
};
@@ -311,7 +311,7 @@ public:
ProfileCommon(ID, Block, ctx, parent, bd);
}
- static bool classof(const LocationContext* Ctx) {
+ static bool classof(const LocationContext *Ctx) {
return Ctx->getKind() == Block;
}
};
diff --git a/include/clang/Analysis/CFG.h b/include/clang/Analysis/CFG.h
index 2f6c4b3640..f995dab7a4 100644
--- a/include/clang/Analysis/CFG.h
+++ b/include/clang/Analysis/CFG.h
@@ -278,7 +278,7 @@ class CFGBlock {
void push_back(CFGElement e, BumpVectorContext &C) { Impl.push_back(e, C); }
reverse_iterator insert(reverse_iterator I, size_t Cnt, CFGElement E,
- BumpVectorContext& C) {
+ BumpVectorContext &C) {
return Impl.insert(I, Cnt, E, C);
}
@@ -453,23 +453,23 @@ public:
// Manipulation of block contents
- void setTerminator(Stmt* Statement) { Terminator = Statement; }
- void setLabel(Stmt* Statement) { Label = Statement; }
+ void setTerminator(Stmt *Statement) { Terminator = Statement; }
+ void setLabel(Stmt *Statement) { Label = Statement; }
void setLoopTarget(const Stmt *loopTarget) { LoopTarget = loopTarget; }
CFGTerminator getTerminator() { return Terminator; }
const CFGTerminator getTerminator() const { return Terminator; }
- Stmt* getTerminatorCondition();
+ Stmt *getTerminatorCondition();
- const Stmt* getTerminatorCondition() const {
+ const Stmt *getTerminatorCondition() const {
return const_cast<CFGBlock*>(this)->getTerminatorCondition();
}
const Stmt *getLoopTarget() const { return LoopTarget; }
- Stmt* getLabel() { return Label; }
- const Stmt* getLabel() const { return Label; }
+ Stmt *getLabel() { return Label; }
+ const Stmt *getLabel() const { return Label; }
unsigned getBlockID() const { return BlockID; }
@@ -477,18 +477,18 @@ public:
void print(raw_ostream &OS, const CFG* cfg, const LangOptions &LO) const;
void printTerminator(raw_ostream &OS, const LangOptions &LO) const;
- void addSuccessor(CFGBlock* Block, BumpVectorContext &C) {
+ void addSuccessor(CFGBlock *Block, BumpVectorContext &C) {
if (Block)
Block->Preds.push_back(this, C);
Succs.push_back(Block, C);
}
- void appendStmt(Stmt* statement, BumpVectorContext &C) {
+ void appendStmt(Stmt *statement, BumpVectorContext &C) {
Elements.push_back(CFGStmt(statement), C);
}
void appendInitializer(CXXCtorInitializer *initializer,
- BumpVectorContext& C) {
+ BumpVectorContext &C) {
Elements.push_back(CFGInitializer(initializer), C);
}
@@ -508,10 +508,10 @@ public:
// steps. First we prepare space for some number of elements, then we insert
// the elements beginning at the last position in prepared space.
iterator beginAutomaticObjDtorsInsert(iterator I, size_t Cnt,
- BumpVectorContext& C) {
+ BumpVectorContext &C) {
return iterator(Elements.insert(I.base(), Cnt, CFGElement(), C));
}
- iterator insertAutomaticObjDtor(iterator I, VarDecl* VD, Stmt* S) {
+ iterator insertAutomaticObjDtor(iterator I, VarDecl *VD, Stmt *S) {
*I = CFGAutomaticObjDtor(VD, S);
return ++I;
}
@@ -565,12 +565,12 @@ public:
/// buildCFG - Builds a CFG from an AST. The responsibility to free the
/// constructed CFG belongs to the caller.
- static CFG* buildCFG(const Decl *D, Stmt* AST, ASTContext *C,
+ static CFG* buildCFG(const Decl *D, Stmt *AST, ASTContext *C,
const BuildOptions &BO);
/// createBlock - Create a new block in the CFG. The CFG owns the block;
/// the caller should not directly free it.
- CFGBlock* createBlock();
+ CFGBlock *createBlock();
/// setEntry - Set the entry block of the CFG. This is typically used
/// only during CFG construction. Most CFG clients expect that the
@@ -579,7 +579,7 @@ public:
/// setIndirectGotoBlock - Set the block used for indirect goto jumps.
/// This is typically used only during CFG construction.
- void setIndirectGotoBlock(CFGBlock* B) { IndirectGotoBlock = B; }
+ void setIndirectGotoBlock(CFGBlock *B) { IndirectGotoBlock = B; }
//===--------------------------------------------------------------------===//
// Block Iterators
@@ -591,8 +591,8 @@ public:
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- CFGBlock& front() { return *Blocks.front(); }
- CFGBlock& back() { return *Blocks.back(); }
+ CFGBlock & front() { return *Blocks.front(); }
+ CFGBlock & back() { return *Blocks.back(); }
iterator begin() { return Blocks.begin(); }
iterator end() { return Blocks.end(); }
@@ -604,13 +604,13 @@ public:
const_reverse_iterator rbegin() const { return Blocks.rbegin(); }
const_reverse_iterator rend() const { return Blocks.rend(); }
- CFGBlock& getEntry() { return *Entry; }
- const CFGBlock& getEntry() const { return *Entry; }
- CFGBlock& getExit() { return *Exit; }
- const CFGBlock& getExit() const { return *Exit; }
+ CFGBlock & getEntry() { return *Entry; }
+ const CFGBlock & getEntry() const { return *Entry; }
+ CFGBlock & getExit() { return *Exit; }
+ const CFGBlock & getExit() const { return *Exit; }
- CFGBlock* getIndirectGotoBlock() { return IndirectGotoBlock; }
- const CFGBlock* getIndirectGotoBlock() const { return IndirectGotoBlock; }
+ CFGBlock * getIndirectGotoBlock() { return IndirectGotoBlock; }
+ const CFGBlock * getIndirectGotoBlock() const { return IndirectGotoBlock; }
//===--------------------------------------------------------------------===//
// Member templates useful for various batch operations over CFGs.
@@ -638,11 +638,11 @@ public:
operator unsigned() const { assert(Idx >=0); return (unsigned) Idx; }
};
- bool isBlkExpr(const Stmt* S) { return getBlkExprNum(S); }
+ bool isBlkExpr(const Stmt *S) { return getBlkExprNum(S); }
bool isBlkExpr(const Stmt *S) const {
return const_cast<CFG*>(this)->isBlkExpr(S);
}
- BlkExprNumTy getBlkExprNum(const Stmt* S);
+ BlkExprNumTy getBlkExprNum(const Stmt *S);
unsigned getNumBlkExprs();
/// getNumBlockIDs - Returns the total number of BlockIDs allocated (which
@@ -654,7 +654,7 @@ public:
//===--------------------------------------------------------------------===//
void viewCFG(const LangOptions &LO) const;
- void print(raw_ostream& OS, const LangOptions &LO) const;
+ void print(raw_ostream &OS, const LangOptions &LO) const;
void dump(const LangOptions &LO) const;
//===--------------------------------------------------------------------===//
@@ -675,8 +675,8 @@ public:
}
private:
- CFGBlock* Entry;
- CFGBlock* Exit;
+ CFGBlock *Entry;
+ CFGBlock *Exit;
CFGBlock* IndirectGotoBlock; // Special block to contain collective dispatch
// for indirect gotos
unsigned NumBlockIDs;
@@ -684,7 +684,7 @@ private:
// BlkExprMap - An opaque pointer to prevent inclusion of DenseMap.h.
// It represents a map from Expr* to integers to record the set of
// block-level expressions and their "statement number" in the CFG.
- void* BlkExprMap;
+ void * BlkExprMap;
BumpVectorContext BlkBVC;
@@ -717,11 +717,11 @@ template <> struct simplify_type< ::clang::CFGTerminator> {
// Traits for: CFGBlock
-template <> struct GraphTraits< ::clang::CFGBlock* > {
+template <> struct GraphTraits< ::clang::CFGBlock *> {
typedef ::clang::CFGBlock NodeType;
typedef ::clang::CFGBlock::succ_iterator ChildIteratorType;
- static NodeType* getEntryNode(::clang::CFGBlock* BB)
+ static NodeType* getEntryNode(::clang::CFGBlock *BB)
{ return BB; }
static inline ChildIteratorType child_begin(NodeType* N)
@@ -731,11 +731,11 @@ template <> struct GraphTraits< ::clang::CFGBlock* > {
{ return N->succ_end(); }
};
-template <> struct GraphTraits< const ::clang::CFGBlock* > {
+template <> struct GraphTraits< const ::clang::CFGBlock *> {
typedef const ::clang::CFGBlock NodeType;
typedef ::clang::CFGBlock::const_succ_iterator ChildIteratorType;
- static NodeType* getEntryNode(const clang::CFGBlock* BB)
+ static NodeType* getEntryNode(const clang::CFGBlock *BB)
{ return BB; }
static inline ChildIteratorType child_begin(NodeType* N)
@@ -762,7 +762,7 @@ template <> struct GraphTraits<Inverse<const ::clang::CFGBlock*> > {
// Traits for: CFG
template <> struct GraphTraits< ::clang::CFG* >
- : public GraphTraits< ::clang::CFGBlock* > {
+ : public GraphTraits< ::clang::CFGBlock *> {
typedef ::clang::CFG::iterator nodes_iterator;
@@ -772,7 +772,7 @@ template <> struct GraphTraits< ::clang::CFG* >
};
template <> struct GraphTraits<const ::clang::CFG* >
- : public GraphTraits<const ::clang::CFGBlock* > {
+ : public GraphTraits<const ::clang::CFGBlock *> {
typedef ::clang::CFG::const_iterator nodes_iterator;
diff --git a/include/clang/Analysis/FlowSensitive/DataflowSolver.h b/include/clang/Analysis/FlowSensitive/DataflowSolver.h
index c2e06b097d..017da636eb 100644
--- a/include/clang/Analysis/FlowSensitive/DataflowSolver.h
+++ b/include/clang/Analysis/FlowSensitive/DataflowSolver.h
@@ -34,7 +34,7 @@ class DataflowWorkListTy {
public:
/// enqueue - Add a block to the worklist. Blocks already on the
/// worklist are not added a second time.
- void enqueue(const CFGBlock* B) {
+ void enqueue(const CFGBlock *B) {
unsigned char &x = BlockSet[B];
if (x == 1)
return;
@@ -43,7 +43,7 @@ public:
}
/// dequeue - Remove a block from the worklist.
- const CFGBlock* dequeue() {
+ const CFGBlock *dequeue() {
assert(!BlockQueue.empty());
const CFGBlock *B = BlockQueue.back();
BlockQueue.pop_back();
@@ -69,20 +69,20 @@ template <> struct ItrTraits<forward_analysis_tag> {
typedef CFGBlock::const_succ_iterator NextBItr;
typedef CFGBlock::const_iterator StmtItr;
- static PrevBItr PrevBegin(const CFGBlock* B) { return B->pred_begin(); }
- static PrevBItr PrevEnd(const CFGB