From 75eeeb173cd3f6425247d3686c19e49117834fc3 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Thu, 11 Aug 2011 01:03:22 +0000 Subject: [PATCH] Make SymbolManager comments doxygen friendly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137290 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Core/PathSensitive/SymbolManager.h | 61 +++++++++++-------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index a610c02f2b..4fa294055a 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -92,7 +92,7 @@ public: typedef const SymbolData* SymbolRef; -// A symbol representing the value of a MemRegion. +/// A symbol representing the value of a MemRegion. class SymbolRegionValue : public SymbolData { const TypedRegion *R; @@ -121,7 +121,7 @@ public: } }; -// A symbol representing the result of an expression. +/// A symbol representing the result of an expression. class SymbolConjured : public SymbolData { const Stmt* S; QualType T; @@ -161,8 +161,8 @@ public: } }; -// A symbol representing the value of a MemRegion whose parent region has -// symbolic value. +/// A symbol representing the value of a MemRegion whose parent region has +/// symbolic value. class SymbolDerived : public SymbolData { SymbolRef parentSymbol; const TypedRegion *R; @@ -271,7 +271,7 @@ public: } }; -// SymIntExpr - Represents symbolic expression like 'x' + 3. +/// SymIntExpr - Represents symbolic expression like 'x' + 3. class SymIntExpr : public SymExpr { const SymExpr *LHS; BinaryOperator::Opcode Op; @@ -314,7 +314,7 @@ public: } }; -// SymSymExpr - Represents symbolic expression like 'x' + 'y'. +/// SymSymExpr - Represents symbolic expression like 'x' + 'y'. class SymSymExpr : public SymExpr { const SymExpr *LHS; BinaryOperator::Opcode Op; @@ -357,6 +357,7 @@ public: class SymbolManager { typedef llvm::FoldingSet DataSetTy; + DataSetTy DataSet; unsigned SymbolCounter; llvm::BumpPtrAllocator& BPAlloc; @@ -372,7 +373,7 @@ public: static bool canSymbolicate(QualType T); - /// Make a unique symbol for MemRegion R according to its kind. + /// \brief Make a unique symbol for MemRegion R according to its kind. const SymbolRegionValue* getRegionValueSymbol(const TypedRegion* R); const SymbolConjured* getConjuredSymbol(const Stmt* E, QualType T, @@ -389,7 +390,8 @@ public: const SymbolExtent *getExtentSymbol(const SubRegion *R); - /// Creates a metadata symbol associated with a specific region. + /// \brief Creates a metadata symbol associated with a specific region. + /// /// VisitCount can be used to differentiate regions corresponding to /// different loop iterations, thus, making the symbol path-dependent. const SymbolMetadata* getMetadataSymbol(const MemRegion* R, const Stmt* S, @@ -446,21 +448,26 @@ public: bool isLive(const Stmt *ExprVal) const; bool isLive(const VarRegion *VR, bool includeStoreBindings = false) const; - // markLive - Unconditionally marks a symbol as live. This should never be - // used by checkers, only by the state infrastructure such as the store and - // environment. Checkers should instead use metadata symbols and markInUse. + /// \brief Unconditionally marks a symbol as live. + /// + /// This should never be + /// used by checkers, only by the state infrastructure such as the store and + /// environment. Checkers should instead use metadata symbols and markInUse. void markLive(SymbolRef sym); - // markInUse - Marks a symbol as important to a checker. For metadata symbols, - // this will keep the symbol alive as long as its associated region is also - // live. For other symbols, this has no effect; checkers are not permitted - // to influence the life of other symbols. This should be used before any - // symbol marking has occurred, i.e. in the MarkLiveSymbols callback. + /// \brief Marks a symbol as important to a checker. + /// + /// For metadata symbols, + /// this will keep the symbol alive as long as its associated region is also + /// live. For other symbols, this has no effect; checkers are not permitted + /// to influence the life of other symbols. This should be used before any + /// symbol marking has occurred, i.e. in the MarkLiveSymbols callback. void markInUse(SymbolRef sym); - // maybeDead - If a symbol is known to be live, marks the symbol as live. - // Otherwise, if the symbol cannot be proven live, it is marked as dead. - // Returns true if the symbol is dead, false if live. + /// \brief If a symbol is known to be live, marks the symbol as live. + /// + /// Otherwise, if the symbol cannot be proven live, it is marked as dead. + /// Returns true if the symbol is dead, false if live. bool maybeDead(SymbolRef sym); typedef SymbolSetTy::const_iterator dead_iterator; @@ -475,25 +482,27 @@ public: region_iterator region_begin() const { return RegionRoots.begin(); } region_iterator region_end() const { return RegionRoots.end(); } - /// isDead - Returns whether or not a symbol has been confirmed dead. This - /// should only be called once all marking of dead symbols has completed. - /// (For checkers, this means only in the evalDeadSymbols callback.) + /// \brief Returns whether or not a symbol has been confirmed dead. + /// + /// This should only be called once all marking of dead symbols has completed. + /// (For checkers, this means only in the evalDeadSymbols callback.) bool isDead(SymbolRef sym) const { return TheDead.count(sym); } void markLive(const MemRegion *region); - /// Set to the value of the symbolic store after + /// \brief Set to the value of the symbolic store after /// StoreManager::removeDeadBindings has been called. void setReapedStore(StoreRef st) { reapedStore = st; } }; class SymbolVisitor { public: - // VisitSymbol - A visitor method invoked by - // GRStateManager::scanReachableSymbols. The method returns \c true if - // symbols should continue be scanned and \c false otherwise. + /// \brief A visitor method invoked by GRStateManager::scanReachableSymbols. + /// + /// The method returns \c true if symbols should continue be scanned and \c + /// false otherwise. virtual bool VisitSymbol(SymbolRef sym) = 0; virtual bool VisitMemRegion(const MemRegion *region) { return true; }; virtual ~SymbolVisitor(); -- 2.40.0