diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-03-27 14:54:49 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-03-27 14:54:49 +0000 |
| commit | b630d5b2c96cac8f56fc355b9b45fa3a92ae116e (patch) | |
| tree | 778bbf7f869d19538263092a1e0f1cbd0b74e7f2 | |
| parent | 565eefd4abc5c325cbf5657347d5f57a47ba7c56 (diff) | |
| download | bcm5719-llvm-b630d5b2c96cac8f56fc355b9b45fa3a92ae116e.tar.gz bcm5719-llvm-b630d5b2c96cac8f56fc355b9b45fa3a92ae116e.zip | |
Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.
llvm-svn: 67838
| -rw-r--r-- | clang/include/clang/Analysis/PathDiagnostic.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/include/clang/Analysis/PathDiagnostic.h b/clang/include/clang/Analysis/PathDiagnostic.h index 23ee83950ae..665bf033935 100644 --- a/clang/include/clang/Analysis/PathDiagnostic.h +++ b/clang/include/clang/Analysis/PathDiagnostic.h @@ -356,6 +356,15 @@ public: virtual FullSourceLoc getLocation() const { return getStartLocation(); } + typedef std::vector<PathDiagnosticLocationPair>::iterator iterator; + iterator begin() { return LPairs.begin(); } + iterator end() { return LPairs.end(); } + + typedef std::vector<PathDiagnosticLocationPair>::const_iterator + const_iterator; + const_iterator begin() const { return LPairs.begin(); } + const_iterator end() const { return LPairs.end(); } + static inline bool classof(const PathDiagnosticPiece* P) { return P->getKind() == ControlFlow; } |

