Re: [PATCH] D16738: Fix invalid casts in .

2016-02-10 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Thanks for putting up with my pickyness. It looks like there are exception safety issues with the order of `__f_ = __as_base(&__buf_)` and `__f->__f_..__clone(__f)` in a bunch of

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-10 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. Thanks for the review! Committed as r260441. Repository: rL LLVM http://reviews.llvm.org/D16738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-08 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D16738#345696, @EricWF wrote: > I prefer using the `(void*)` casts when possible. In particular when doing > the pointer comparisons. Could you change those back to `void*` casts then > use the `__as_base` function for the rest? done

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-08 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 47271. Repository: rL LLVM http://reviews.llvm.org/D16738 Files: include/__config include/functional Index: include/functional === --- include/functional +++ include/functional @@

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-06 Thread Eric Fiselier via cfe-commits
EricWF added a comment. I prefer using the `(void*)` casts when possible. In particular when doing the pointer comparisons. Could you change those back to `void*` casts then use the `__as_base` function for the rest? Repository: rL LLVM http://reviews.llvm.org/D16738

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46857. eugenis added a comment. How about this? Repository: rL LLVM http://reviews.llvm.org/D16738 Files: include/__config include/functional Index: include/functional === ---

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-01 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D16738#340175, @EricWF wrote: > > This also could be fixed in a different way by replacing C-style > > > casts with reinterpret_cast<>, which, from my reading of the > > > standard, is allowed in this context. > > > I agree that using `void*`

Re: [PATCH] D16738: Fix invalid casts in .

2016-01-30 Thread Eric Fiselier via cfe-commits
EricWF added a comment. > This also could be fixed in a different way by replacing C-style > casts with reinterpret_cast<>, which, from my reading of the > standard, is allowed in this context. I agree that using `void*` to represent raw memory is the better approach than

Re: [PATCH] D16738: Fix invalid casts in .

2016-01-29 Thread Eric Fiselier via cfe-commits
EricWF added a comment. > This code triggers CFI warnings. What are CFI warnings? Sorry if that's a dumb question, I just don't recognize "CFI". Repository: rL LLVM http://reviews.llvm.org/D16738 ___ cfe-commits mailing list

[PATCH] D16738: Fix invalid casts in .

2016-01-29 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added subscribers: cfe-commits, pcc. eugenis set the repository for this revision to rL LLVM. static_cast of a pointer to object before the start of the object's lifetime has undefined behavior (c++14 p3.8) This

Re: [PATCH] D16738: Fix invalid casts in .

2016-01-29 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. http://clang.llvm.org/docs/ControlFlowIntegrity.html Basically it says that the cast to __base is done on a memory that does not contain an object of type __base (based on the vptr value). Repository: rL LLVM http://reviews.llvm.org/D16738