[cfe-commits] r67838 - /cfe/trunk/include/clang/Analysis/PathDiagnostic.h
Ted Kremenek
kremenek at apple.com
Fri Mar 27 07:55:21 PDT 2009
Author: kremenek
Date: Fri Mar 27 09:54:49 2009
New Revision: 67838
URL: http://llvm.org/viewvc/llvm-project?rev=67838&view=rev
Log:
Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.
Modified:
cfe/trunk/include/clang/Analysis/PathDiagnostic.h
Modified: cfe/trunk/include/clang/Analysis/PathDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathDiagnostic.h?rev=67838&r1=67837&r2=67838&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathDiagnostic.h (original)
+++ cfe/trunk/include/clang/Analysis/PathDiagnostic.h Fri Mar 27 09:54:49 2009
@@ -356,6 +356,15 @@
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;
}
More information about the cfe-commits
mailing list