[PATCH] D33563: Track whether a unary operation can overflow

2018-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! Committed in r322074. https://reviews.llvm.org/D33563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D33563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks fine to me, wait to see if Eli has more comments. https://reviews.llvm.org/D33563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 128984. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. https://reviews.llvm.org/D33563 Files: include/clang/AST/Expr.h lib/AST/ASTDumper.cpp lib/AST/ASTImporter.cpp

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/Misc/ast-dump-stmt.c:66 + // CHECK:ImplicitCastExpr + // CHECK: DeclRefExpr{{.*}}'T2' 'int' +} efriedma wrote: > aaron.ballman wrote: > > efriedma wrote: > > > What does it mean for bitwise

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/Misc/ast-dump-stmt.c:66 + // CHECK:ImplicitCastExpr + // CHECK: DeclRefExpr{{.*}}'T2' 'int' +} aaron.ballman wrote: > efriedma wrote: > > What does it mean for bitwise complement to "overflow"?

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 128858. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Herald added a subscriber: javed.absar. Updated based on review feedback. https://reviews.llvm.org/D33563 Files: include/clang/AST/Expr.h lib/AST/ASTDumper.cpp

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
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) + :

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. 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,

[PATCH] D33563: Track whether a unary operation can overflow

2018-01-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Post-holiday ping. https://reviews.llvm.org/D33563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33563: Track whether a unary operation can overflow

2017-11-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 124320. aaron.ballman added a comment. Rebased against ToT, ping. https://reviews.llvm.org/D33563 Files: include/clang/AST/Expr.h lib/AST/ASTDumper.cpp lib/AST/ASTImporter.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGExprScalar.cpp

[PATCH] D33563: Track whether a unary operation can overflow

2017-06-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Ping https://reviews.llvm.org/D33563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33563: Track whether a unary operation can overflow

2017-05-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:9 +VK_LValue, OK_Ordinary, Loc, true); // Construct the loop that copies all elements of this array. ahatanak

[PATCH] D33563: Track whether a unary operation can overflow

2017-05-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 100703. aaron.ballman added a comment. Addressing review comments. https://reviews.llvm.org/D33563 Files: include/clang/AST/Expr.h lib/AST/ASTDumper.cpp lib/AST/ASTImporter.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGExprScalar.cpp

[PATCH] D33563: Track whether a unary operation can overflow

2017-05-29 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:9 +VK_LValue, OK_Ordinary, Loc, true); // Construct the loop that copies all elements of this array. Can we pass false here if we know the array size is not too

[PATCH] D33563: Track whether a unary operation can overflow

2017-05-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. We do not explicitly model integer promotions on unary operators even though those promotions happen in practice. This patch tracks the most important piece of information about the promotion on the AST node: whether the operator can overflow or not. It