diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-01-19 15:14:51 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-01-19 15:14:51 +0000 |
commit | 372c3f1f99dd98627c0bf0e2a1d2c0f2ed8a6ce9 (patch) | |
tree | 2d289703abc66c72b4647149e5d303cc28240735 /lldb/packages/Python/lldbsuite/test/expression_command/call-function/main.cpp | |
parent | eb74ab8633d63fefceb9c1ab5b7fbf2b8d9779de (diff) | |
download | bcm5719-llvm-372c3f1f99dd98627c0bf0e2a1d2c0f2ed8a6ce9.tar.gz bcm5719-llvm-372c3f1f99dd98627c0bf0e2a1d2c0f2ed8a6ce9.zip |
[CodeGenCXX] annotate a GEP to a derived class with 'inbounds' (PR35909)
The standard says:
[expr.static.cast] p11: "If the prvalue of type “pointer to cv1 B” points to a B
that is actually a subobject of an object of type D, the resulting pointer points
to the enclosing object of type D. Otherwise, the behavior is undefined."
Therefore, the GEP must be inbounds.
This should solve the failure to optimize away a null check shown in PR35909:
https://bugs.llvm.org/show_bug.cgi?id=35909
Differential Revision: https://reviews.llvm.org/D42249
llvm-svn: 322950
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/call-function/main.cpp')
0 files changed, 0 insertions, 0 deletions