r213500 - Add clang::DesignatedInitExpr::designators() for range-based access,
James Dennett
jdennett at google.com
Sun Jul 20 23:03:12 PDT 2014
Author: jdennett
Date: Mon Jul 21 01:03:12 2014
New Revision: 213500
URL: http://llvm.org/viewvc/llvm-project?rev=213500&view=rev
Log:
Add clang::DesignatedInitExpr::designators() for range-based access,
with overloads for designators_range and designators_const_range.
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=213500&r1=213499&r2=213500&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Mon Jul 21 01:03:12 2014
@@ -4167,6 +4167,17 @@ public:
return Designators + NumDesignators;
}
+ typedef llvm::iterator_range<designators_iterator> designators_range;
+ designators_range designators() {
+ return designators_range(designators_begin(), designators_end());
+ }
+
+ typedef llvm::iterator_range<const_designators_iterator>
+ designators_const_range;
+ designators_const_range designators() const {
+ return designators_const_range(designators_begin(), designators_end());
+ }
+
typedef std::reverse_iterator<designators_iterator>
reverse_designators_iterator;
reverse_designators_iterator designators_rbegin() {
More information about the cfe-commits
mailing list