This revision was automatically updated to reflect the committed changes.
Closed by commit rL322950: [CodeGenCXX] annotate a GEP to a derived class with
'inbounds' (PR35909) (authored by spatel, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.ll
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D42249
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/c
spatel updated this revision to Diff 130488.
spatel added a comment.
Patch updated:
1. Removed comment that didn't add value.
2. Added test with no sanitizing, reduced from PR35909.
https://reviews.llvm.org/D42249
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/catch-undef-behavior.cpp
te
efriedma added inline comments.
Comment at: lib/CodeGen/CGClass.cpp:410
+
+ // The GEP is to a derived object, so this GEP must be 'inbounds'.
+ Value = Builder.CreateInBoundsGEP(Value, Builder.CreateNeg(NonVirtualOffset),
Not sure this comment really adds anyt
spatel created this revision.
spatel added reviewers: efriedma, hfinkel, rjmccall, rsmith.
Herald added a subscriber: mcrosier.
I'm not sure if the code comment is adequate or even correct, but hopefully the
change itself is valid.
Eli cited this section of the standard in PR35909 (
https://bug