Thanks David! Patch attached...
On 6 November 2013 14:25, David Majnemer <[email protected]> wrote: > There doesn't seem to see a patch attached. > > > On Wed, Nov 6, 2013 at 2:50 AM, Will Wilson <[email protected]> wrote: > >> Hi Richard, >> >> Only just had another crack at this MS mode issue. I've updated the patch >> and added your example to the test case. The new version correctly mirrors >> MSVC's handling in clang with C++11 mode active. >> >> All tests pass and clang-format applied. Let me know what you think. >> >> Cheers, >> Will. >> >> >> On 28 August 2013 03:11, Will Wilson <[email protected]> wrote: >> >>> Thanks for the review (and catching the fail on my part)! >>> >>> MSVC accepts your templated example without complaint. The patched clang >>> asserts in EvalAddr() in SemaChecking.cpp after being called by >>> Sema::CheckReturnStackAddr() with "EvalAddr only works on pointers" using >>> your example case. >>> >>> Do you have some ideas on how best to support this facet of MSVC >>> behavior without uglifying the code too much? >>> >>> Thanks, >>> Will. >>> >>> >>> On 27 August 2013 22:04, Richard Smith <[email protected]> wrote: >>> >>>> Please use isCXX98IntegralConstantExpr, not isIntegerConstantExpr, in >>>> C++11 + MicrosoftMode. (Take a look at how we behaved prior to r183883.) We >>>> *really* don't want to use full constexpr evaluation when determining >>>> whether an expression is a null pointer constant. >>>> >>>> Also, this patch tries to evaluate value-dependent potential null >>>> pointer constants in C++11 + MicrosoftMode. That's not OK, and will >>>> sometimes assert. How should we behave here? Does MSVC accept this: >>>> >>>> template<int N> int *f() { return N; } >>>> int *p = f<0>(); >>>> >>>> ? >>>> >>>> >>>> On Tue, Aug 27, 2013 at 10:05 AM, Will Wilson <[email protected]>wrote: >>>> >>>>> Hi All, >>>>> >>>>> This patch uses the more relaxed integer expression codepath in >>>>> Expr::isNullPointerConstant() when MicrosoftMode is enabled, this reflects >>>>> MSVC behavior and is required to compile various cases I've come across in >>>>> MSVC targeted code. >>>>> >>>>> Test case included. Built and tested against latest code. Please >>>>> review and commit if possible. >>>>> >>>>> Thanks! >>>>> Will. >>>>> >>>>> -- >>>>> *Indefiant Ltd.* >>>>> >>>>> _______________________________________________ >>>>> cfe-commits mailing list >>>>> [email protected] >>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >>>>> >>>>> >>>> >>> >>> >>> -- >>> *Indefiant Ltd.* >>> >> >> >> >> -- >> *Indefiant Ltd.* >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> >> > -- *Indefiant Ltd.*
isnullpointer_msvc.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
