[PATCH] D31153: Add the ability to use the children() range API in a const-correct manner
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 11 10:52:06 PDT 2017
Ah - perhaps it'd be worth having a standalone forward declaration for
clarity? I don't think I've seen this construct anywhere else in LLVM? But
I could be wrong.
On Tue, Apr 11, 2017 at 10:51 AM Aaron Ballman via Phabricator <
reviews at reviews.llvm.org> wrote:
> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170411/8b232514/attachment.html>
More information about the cfe-commits
mailing list