[PATCH] D49045: PR15730/PR16986 Allow dependently typed vector_size types.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 13 12:13:28 PDT 2018


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





More information about the cfe-commits mailing list