diff options
author | Anna Zaks <ganna@apple.com> | 2011-12-06 23:12:38 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-12-06 23:12:38 +0000 |
commit | a91efb14cbf6af999dee02d9b611a57c7b52e209 (patch) | |
tree | 67c667eca5beb0047bc39efd865281b67ce38f52 | |
parent | 1d1d515b2bafb59d624883d8fdda97d4b7dba0cb (diff) |
[analyzer] Add comments related to symbol_iterator
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145987 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h | 6 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/ProgramState.cpp | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index d47363cc10..0c8196e1ab 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -70,6 +70,11 @@ public: // Implement isa<T> support. static inline bool classof(const SymExpr*) { return true; } + /// \brief Iterator over symbols that the current symbol depends on. + /// + /// For SymbolData, it's the symbol itself; for expressions, it's the + /// expression symbol and all the operands in it. Note, SymbolDerived is + /// treated as SymbolData - the iterator will NOT visit the parent region. class symbol_iterator { SmallVector<const SymExpr*, 5> itr; void expand(); @@ -87,7 +92,6 @@ public: symbol_iterator symbol_begin() const { return symbol_iterator(this); } - static symbol_iterator symbol_end() { return symbol_iterator(); } }; diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp index a725d38192..2f9a3929e8 100644 --- a/lib/StaticAnalyzer/Core/ProgramState.cpp +++ b/lib/StaticAnalyzer/Core/ProgramState.cpp @@ -553,6 +553,7 @@ bool ScanReachableSymbols::scan(const SymExpr *sym) { if (!visitor.VisitSymbol(sym)) return false; + // TODO: should be rewritten using SymExpr::symbol_iterator. switch (sym->getKind()) { case SymExpr::RegionValueKind: case SymExpr::ConjuredKind: |