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 < revi...@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 > > > >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits