[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 31 10:45:15 PDT 2018
erichkeane added inline comments.
================
Comment at: include/clang/AST/Expr.h:2805
+ }
+ BasePathSizeTy &BasePathSize();
+
----------------
erichkeane wrote:
> Why is this a reference? This seems odd... It seems that the const-cast magic above shouldn't be necessary either.
Looking more into this, I think the reference here is an 'equal of two evils'. I can't catch myself really preferring one way over the other.
================
Comment at: include/clang/AST/Expr.h:2815
+ BasePathSize() = basePathSize;
+ assert(BasePathSize() == basePathSize &&
+ "basePathSize doesn't fit in bits of BasePathSize!");
----------------
This assert shouldn't be necessary. I think setBasePathSize could just take BasePathSizeTy.
Repository:
rC Clang
https://reviews.llvm.org/D50050
More information about the cfe-commits
mailing list