aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM, though it's your call on the const_cast stuff whether you want to revert or keep it. ================ Comment at: include/clang/AST/Type.h:3105 +public: + Expr *getSizeExpr() const { return SizeExpr; } + QualType getElementType() const { return ElementType; } ---------------- erichkeane wrote: > aaron.ballman wrote: > > Can this return `const Expr *` and have a non-const overload to return the > > non-const `Expr *`? > Done, but unfortunately, TypeLoc visitation (RecursiveASTVisitor) lacks const > correctness in a bunch of places so a cast was required there :/ > Additionally, TreeTransform has similar issues, so a const-cast was required > as well. Both end up being a bit of a cleanup, perhaps more than I can > tackle at the moment. Oye, now that I see how many const_cast's get added, I'm starting to regret asking for this. :-P Your call as to whether you want to leave it in this state or revert back the const-correctness attempt. https://reviews.llvm.org/D49045 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits