rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
This essentially looks fine. Let me know if you want me to take another look
once you've fixed the `ignorePointerCastsAndParens` bug with derived-to-base
conversions, otherwise go ahead.
george.burgess.iv closed this revision.
george.burgess.iv marked 2 inline comments as done.
george.burgess.iv added a comment.
r246877. Thanks for the review!
(Also: Forgot to submit comments with the most recent revision, so you're
getting them all now. Sorry. :) )
Comment
steven_wu added a subscriber: steven_wu.
steven_wu added a comment.
This commit seems to cause miscompile in LNT testsuite with -O0 and -O3
http://lab.llvm.org:8080/green/job/perf_o0g_run/7070/warnings2Result/new/
http://lab.llvm.org:8080/green/job/perf_o3lto_run/15591/warnings2Result/new/
Looks
george.burgess.iv updated this revision to Diff 33875.
george.burgess.iv marked 16 inline comments as done.
george.burgess.iv added a comment.
Addressed all feedback; backed out support for more questionable features
(negative indices, non-object-boundary offsets, etc), added logic to ignore
george.burgess.iv updated this revision to Diff 33104.
george.burgess.iv added a comment.
Talked with Richard, and we both agree that adding 4 EvaluationModes is too
much for the use case. So, we decided to add a flag to LValue to denote that
the LValueBase is invalid. This allows us to get by
george.burgess.iv added inline comments.
Comment at: lib/AST/ExprConstant.cpp:4763
@@ +4762,3 @@
+ /// arithmetic.
+ bool UseStrictCastingRules;
+
rsmith wrote:
This should be handled as an `EvaluationMode`.
Works for me.
Comment at:
george.burgess.iv created this revision.
george.burgess.iv added a reviewer: rsmith.
george.burgess.iv added a subscriber: cfe-commits.
(Hoping the formatting works as one would expect)
Motivating examples:
Pre-patch:
```
__builtin_object_size((char*)foo, 0) != __builtin_object_size(foo, 0) //
vsk added a subscriber: vsk.
vsk added a comment.
Just a minor nitpick.
Comment at: lib/AST/ExprConstant.cpp:51
@@ -50,1 +50,3 @@
+#include iostream
+
Do you need iostream?
http://reviews.llvm.org/D12169
___
george.burgess.iv updated this revision to Diff 32662.
george.burgess.iv added a comment.
Removed advanced debugging tools (iostream)
http://reviews.llvm.org/D12169
Files:
lib/AST/ExprConstant.cpp
test/CXX/expr/expr.const/p2-0x.cpp
test/CodeGen/object-size.c
Index: