[PATCH] D33563: Track whether a unary operation can overflow
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 25 13:23:04 PDT 2017
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 then pulls this logic out from various places and instead uses what's calculated on the AST node.
This is effectively a NFC patch, however, it does help out-of-tree builds that need to know about the integral promotions.
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
lib/CodeGen/CGStmtOpenMP.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaPseudoObject.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
test/Misc/ast-dump-stmt.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33563.100286.patch
Type: text/x-patch
Size: 15664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170525/a1f7e89f/attachment.bin>
More information about the cfe-commits
mailing list