aaron.ballman added a comment.
Thanks for the review!
================
Comment at: include/clang/AST/Expr.h:1728
+ UnaryOperator(Expr *input, Opcode opc, QualType type, ExprValueKind VK,
+ ExprObjectKind OK, SourceLocation l, bool CanOverflow = false)
+ : Expr(UnaryOperatorClass, type, VK, OK,
----------------
efriedma wrote:
> Is the default argument necessary here? Better to avoid when possible.
It's not required, but there are quite a few places where we gin up a
UnaryOperator for things like address of or dereference where there is no
overflow possible. However, I agree that less default arguments are better, so
I've made it a required formal argument.
================
Comment at: test/Misc/ast-dump-stmt.c:66
+ // CHECK: ImplicitCastExpr
+ // CHECK: DeclRefExpr{{.*}}'T2' 'int'
+}
----------------
efriedma wrote:
> What does it mean for bitwise complement to "overflow"?
When the sign bit flips on a signed value, e.g., `~0`.
https://reviews.llvm.org/D33563
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits