diff options
author | James Y Knight <jyknight@google.com> | 2018-10-10 02:53:43 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2018-10-10 02:53:43 +0000 |
commit | 892b09ba11c99f033a8dd1ec62e04754aaeeba7c (patch) | |
tree | 6a6297616f4d330ef66d86b49a2d0a414fa024bb /clang/lib/Basic/SourceManager.cpp | |
parent | bc1586352e135fb673360b7d56743ed516c5f7ee (diff) | |
download | llvm-892b09ba11c99f033a8dd1ec62e04754aaeeba7c.zip llvm-892b09ba11c99f033a8dd1ec62e04754aaeeba7c.tar.gz llvm-892b09ba11c99f033a8dd1ec62e04754aaeeba7c.tar.bz2 |
ExprConstant: Make __builtin_object_size use EM_IgnoreSideEffects.
And, since EM_OffsetFold is now unused, remove it.
While builtin_object_size intends to ignore the presence of
side-effects in its argument, the EM_OffsetFold mode was NOT
configured to ignore side-effects. Rather it was effectively identical
to EM_ConstantFold -- its explanatory comment
notwithstanding.
However, currently, keepEvaluatingAfterSideEffect() is not always
honored -- sometimes evaluation continues despite it returning
false. Therefore, since the b_o_s code was only checking the return
value from evaluation, and not additionally checking the
HasSideEffects flag, side-effects _were_ in many cases actually being
ignored.
This change is a prerequisite cleanup towards fixing that issue.
Differential Revision: https://reviews.llvm.org/D52924
llvm-svn: 344110
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions