[PATCH] D42249: [CodeGenCXX] annotate a GEP to a derived class with 'inbounds' (PR35909)

2018-01-19 Thread Sanjay Patel via Phabricator via cfe-commits
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

[PATCH] D42249: [CodeGenCXX] annotate a GEP to a derived class with 'inbounds' (PR35909)

2018-01-18 Thread Eli Friedman via Phabricator via cfe-commits
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

[PATCH] D42249: [CodeGenCXX] annotate a GEP to a derived class with 'inbounds' (PR35909)

2018-01-18 Thread Sanjay Patel via Phabricator via cfe-commits
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

[PATCH] D42249: [CodeGenCXX] annotate a GEP to a derived class with 'inbounds' (PR35909)

2018-01-18 Thread Eli Friedman via Phabricator via cfe-commits
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

[PATCH] D42249: [CodeGenCXX] annotate a GEP to a derived class with 'inbounds' (PR35909)

2018-01-18 Thread Sanjay Patel via Phabricator via cfe-commits
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