riccibruno marked an inline comment as done.
riccibruno added inline comments.


================
Comment at: include/clang/AST/Expr.h:5208
+  ArrayRef<Expr *> getAssocExprs() const {
+    return {reinterpret_cast<Expr *const *>(getTrailingObjects<Stmt *>() +
+                                            ASSOC_EXPR_START),
----------------
riccibruno wrote:
> aaron.ballman wrote:
> > Do we need to use `reinterpret_cast` here, or can this be done through 
> > llvm's casting machinery instead?
> I believe that it is needed, because `Stmt **` is not otherwise convertible 
> to `Expr **`. This is all over the place in the statement/expression nodes, 
> and indeed it depends on the layout of `Expr` and `Stmt`.
Ugh ignore the comment about the layout. I was thinking about the 
`reinterpret_cast`s between `Stmt *` and `Expr *` in `Stmt.h`


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57098/new/

https://reviews.llvm.org/D57098



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to