[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization
Serge Pavlov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 10 01:40:05 PDT 2018
sepavloff updated this revision to Diff 146091.
sepavloff added a comment.
Updated patch
Try evaluating initializer value only if the initializer type is
integral or pointer. It avoids calculation of large value, which
then is discarded.
Repository:
rC Clang
https://reviews.llvm.org/D46241
Files:
include/clang/AST/Expr.h
lib/AST/ExprConstant.cpp
lib/CodeGen/CGExprConstant.cpp
test/CodeGen/const-init.c
test/CodeGen/designated-initializers.c
test/CodeGen/union-init2.c
test/CodeGenCXX/cxx11-initializer-aggregate.cpp
test/CodeGenCXX/cxx1z-initializer-aggregate.cpp
test/SemaCXX/large-array-init.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46241.146091.patch
Type: text/x-patch
Size: 9508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180510/648705f7/attachment.bin>
More information about the cfe-commits
mailing list