diff options
Diffstat (limited to 'include/clang/Analysis')
-rw-r--r-- | include/clang/Analysis/PathSensitive/GRExprEngine.h | 52 | ||||
-rw-r--r-- | include/clang/Analysis/PathSensitive/RValues.h | 16 | ||||
-rw-r--r-- | include/clang/Analysis/PathSensitive/SymbolManager.h | 8 |
3 files changed, 38 insertions, 38 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRExprEngine.h b/include/clang/Analysis/PathSensitive/GRExprEngine.h index 6b96ccf201..051fd1b490 100644 --- a/include/clang/Analysis/PathSensitive/GRExprEngine.h +++ b/include/clang/Analysis/PathSensitive/GRExprEngine.h @@ -88,19 +88,19 @@ protected: /// CurrentStmt - The current block-level statement. Stmt* CurrentStmt; - typedef llvm::SmallPtrSet<NodeTy*,2> UninitBranchesTy; - typedef llvm::SmallPtrSet<NodeTy*,2> UninitStoresTy; + typedef llvm::SmallPtrSet<NodeTy*,2> UndefBranchesTy; + typedef llvm::SmallPtrSet<NodeTy*,2> UndefStoresTy; typedef llvm::SmallPtrSet<NodeTy*,2> BadDerefTy; typedef llvm::SmallPtrSet<NodeTy*,2> BadDividesTy; typedef llvm::SmallPtrSet<NodeTy*,2> NoReturnCallsTy; - /// UninitBranches - Nodes in the ExplodedGraph that result from - /// taking a branch based on an uninitialized value. - UninitBranchesTy UninitBranches; + /// UndefBranches - Nodes in the ExplodedGraph that result from + /// taking a branch based on an undefined value. + UndefBranchesTy UndefBranches; - /// UninitStores - Sinks in the ExplodedGraph that result from - /// making a store to an uninitialized lvalue. - UninitStoresTy UninitStores; + /// UndefStores - Sinks in the ExplodedGraph that result from + /// making a store to an undefined lvalue. + UndefStoresTy UndefStores; /// NoReturnCalls - Sinks in the ExplodedGraph that result from // calling a function with the attribute "noreturn". @@ -115,11 +115,11 @@ protected: BadDerefTy ExplicitNullDeref; /// UnitDeref - Nodes in the ExplodedGraph that result from - /// taking a dereference on an uninitialized value. - BadDerefTy UninitDeref; + /// taking a dereference on an undefined value. + BadDerefTy UndefDeref; /// BadDivides - Nodes in the ExplodedGraph that result from evaluating - /// a divide-by-zero or divide-by-uninitialized. + /// a divide-by-zero or divide-by-undefined. BadDividesTy BadDivides; bool StateCleaned; @@ -157,12 +157,12 @@ public: /// in the ExplodedGraph. StateTy getInitialState(); - bool isUninitControlFlow(const NodeTy* N) const { - return N->isSink() && UninitBranches.count(const_cast<NodeTy*>(N)) != 0; + bool isUndefControlFlow(const NodeTy* N) const { + return N->isSink() && UndefBranches.count(const_cast<NodeTy*>(N)) != 0; } - bool isUninitStore(const NodeTy* N) const { - return N->isSink() && UninitStores.count(const_cast<NodeTy*>(N)) != 0; + bool isUndefStore(const NodeTy* N) const { + return N->isSink() && UndefStores.count(const_cast<NodeTy*>(N)) != 0; } bool isImplicitNullDeref(const NodeTy* N) const { @@ -173,8 +173,8 @@ public: return N->isSink() && ExplicitNullDeref.count(const_cast<NodeTy*>(N)) != 0; } - bool isUninitDeref(const NodeTy* N) const { - return N->isSink() && UninitDeref.count(const_cast<NodeTy*>(N)) != 0; + bool isUndefDeref(const NodeTy* N) const { + return N->isSink() && UndefDeref.count(const_cast<NodeTy*>(N)) != 0; } bool isBadDivide(const NodeTy* N) const { @@ -189,9 +189,9 @@ public: null_deref_iterator null_derefs_begin() { return ExplicitNullDeref.begin(); } null_deref_iterator null_derefs_end() { return ExplicitNullDeref.end(); } - typedef BadDerefTy::iterator uninit_deref_iterator; - uninit_deref_iterator uninit_derefs_begin() { return UninitDeref.begin(); } - uninit_deref_iterator uninit_derefs_end() { return UninitDeref.end(); } + typedef BadDerefTy::iterator undef_deref_iterator; + undef_deref_iterator undef_derefs_begin() { return UndefDeref.begin(); } + undef_deref_iterator undef_derefs_end() { return UndefDeref.end(); } typedef BadDividesTy::iterator bad_divide_iterator; bad_divide_iterator bad_divides_begin() { return BadDivides.begin(); } @@ -298,9 +298,9 @@ protected: /// The states are not guaranteed to be unique. void Nodify(NodeSet& Dst, Stmt* S, NodeTy* Pred, const StateTy::BufferTy& SB); - /// HandleUninitializedStore - Create the necessary sink node to represent - /// a store to an "uninitialized" LVal. - void HandleUninitializedStore(Stmt* S, NodeTy* Pred); + /// HandleUndefinedStore - Create the necessary sink node to represent + /// a store to an "undefined" LVal. + void HandleUndefinedStore(Stmt* S, NodeTy* Pred); /// Visit - Transfer function logic for all statements. Dispatches to /// other functions that handle specific kinds of statements. @@ -344,7 +344,7 @@ protected: void VisitDeref(UnaryOperator* B, NodeTy* Pred, NodeSet& Dst); RVal EvalCast(RVal X, QualType CastT) { - if (X.isUnknownOrUninit()) + if (X.isUnknownOrUndef()) return X; if (isa<LVal>(X)) @@ -371,8 +371,8 @@ protected: RVal EvalBinOp(BinaryOperator::Opcode Op, RVal L, RVal R) { - if (L.isUninit() || R.isUninit()) - return UninitializedVal(); + if (L.isUndef() || R.isUndef()) + return UndefinedVal(); if (L.isUnknown() || R.isUnknown()) return UnknownVal(); diff --git a/include/clang/Analysis/PathSensitive/RValues.h b/include/clang/Analysis/PathSensitive/RValues.h index 493fc1645c..ca94e4ddba 100644 --- a/include/clang/Analysis/PathSensitive/RValues.h +++ b/include/clang/Analysis/PathSensitive/RValues.h @@ -26,7 +26,7 @@ namespace clang { class RVal { public: - enum BaseKind { UninitializedKind, UnknownKind, LValKind, NonLValKind }; + enum BaseKind { UndefinedKind, UnknownKind, LValKind, NonLValKind }; enum { BaseBits = 2, BaseMask = 0x3 }; protected: @@ -71,11 +71,11 @@ public: return getRawKind() == UnknownKind; } - inline bool isUninit() const { - return getRawKind() == UninitializedKind; + inline bool isUndef() const { + return getRawKind() == UndefinedKind; } - inline bool isUnknownOrUninit() const { + inline bool isUnknownOrUndef() const { return getRawKind() <= UnknownKind; } @@ -103,13 +103,13 @@ public: } }; -class UninitializedVal : public RVal { +class UndefinedVal : public RVal { public: - UninitializedVal() : RVal(UninitializedKind) {} - UninitializedVal(void* D) : RVal(UninitializedKind, D) {} + UndefinedVal() : RVal(UndefinedKind) {} + UndefinedVal(void* D) : RVal(UndefinedKind, D) {} static inline bool classof(const RVal* V) { - return V->getBaseKind() == UninitializedKind; + return V->getBaseKind() == UndefinedKind; } void* getData() const { return Data; } diff --git a/include/clang/Analysis/PathSensitive/SymbolManager.h b/include/clang/Analysis/PathSensitive/SymbolManager.h index 3747f54d7d..a67afed11f 100644 --- a/include/clang/Analysis/PathSensitive/SymbolManager.h +++ b/include/clang/Analysis/PathSensitive/SymbolManager.h @@ -49,7 +49,7 @@ public: class SymbolData { public: - enum Kind { UninitKind, ParmKind, GlobalKind, ContentsOfKind }; + enum Kind { UndefKind, ParmKind, GlobalKind, ContentsOfKind }; private: uintptr_t Data; @@ -60,17 +60,17 @@ protected: SymbolData(void* D, Kind k) : Data(reinterpret_cast<uintptr_t>(D)), K(k) {} void* getPtr() const { - assert (K != UninitKind); + assert (K != UndefKind); return reinterpret_cast<void*>(Data); } uintptr_t getInt() const { - assert (K != UninitKind); + assert (K != UndefKind); return Data; } public: - SymbolData() : Data(0), K(UninitKind) {} + SymbolData() : Data(0), K(UndefKind) {} Kind getKind() const { return K; } |