From: Ted Kremenek Date: Thu, 23 Oct 2008 23:35:43 +0000 (+0000) Subject: Added iterators for types. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e22d911dcff7a9c18b583817b7319c07600fd3ee;p=clang Added iterators for types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58050 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 6ca92df0e5..b393e52c9c 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -455,6 +455,18 @@ public: // corresponding unsigned integer type. QualType getCorrespondingUnsignedType(QualType T); + //===--------------------------------------------------------------------===// + // Type Iterators. + //===--------------------------------------------------------------------===// + + typedef std::vector::iterator type_iterator; + typedef std::vector::const_iterator const_type_iterator; + + type_iterator types_begin() { return Types.begin(); } + type_iterator types_end() { return Types.end(); } + const_type_iterator types_begin() const { return Types.begin(); } + const_type_iterator types_end() const { return Types.end(); } + //===--------------------------------------------------------------------===// // Serialization //===--------------------------------------------------------------------===//