[PATCH] D31153: Add the ability to use the children() range API in a const-correct manner

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 10:51:14 PDT 2017


aaron.ballman added inline comments.


================
Comment at: include/clang/AST/StmtIterator.h:137
+  inline friend StmtIterator
+  cast_away_const(const struct ConstStmtIterator &RHS);
 };
----------------
dblaikie wrote:
> the "struct" here is a bit atypical/should be removed
The forward reference is needed because `ConstStmtIterator` is defined below `StmtIterator`. If I use `class` rather than `struct`, then MSVC diagnoses because of the mismatched class-key (which is a pretty low-value diagnostic, but I see no reason to disable it either).


https://reviews.llvm.org/D31153





More information about the cfe-commits mailing list