[libcxx] r288544 - Work around a bug in Clang's implementation of noexcept function types

Hal Finkel via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 2 14:54:38 PST 2016


----- Original Message -----
> From: "Eric Fiselier via cfe-commits" <cfe-commits at lists.llvm.org>
> To: cfe-commits at lists.llvm.org
> Sent: Friday, December 2, 2016 4:30:53 PM
> Subject: [libcxx] r288544 - Work around a bug in Clang's implementation of noexcept function types
> 
> Author: ericwf
> Date: Fri Dec  2 16:30:52 2016
> New Revision: 288544
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=288544&view=rev
> Log:
> Work around a bug in Clang's implementation of noexcept function
> types
> 
> Modified:
>     libcxx/trunk/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
> 
> Modified:
> libcxx/trunk/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp?rev=288544&r1=288543&r2=288544&view=diff
> ==============================================================================
> ---
> libcxx/trunk/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
> (original)
> +++
> libcxx/trunk/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp
> Fri Dec  2 16:30:52 2016
> @@ -54,7 +54,11 @@ constexpr bool throws_callable() {
>  void test_noexcept_function_pointers()
>  {
>      struct Dummy { void foo() noexcept {} static void bar() noexcept
>      {} };
> -#if !defined(__cpp_noexcept_function_type)
> +
> +// FIXME(EricWF): Remove the __clang__ workaround. As of 2/12/2016

As a general note, it is confusing to write dates this way. Most people in the US will read this as Feb. 12th, 2016. Others will read it as Dec. 2nd, 2016. I recommend using 2016-12-02 to avoid confusion.

 -Hal

> Clang has
> +// a bug where calling a noexcept function pointer is not noexcept.
> +// See https://llvm.org/bugs/show_bug.cgi?id=31244
> +#if !defined(__cpp_noexcept_function_type) || defined(__clang__)
>      {
>          // Check that PMF's and function pointers *work*.
>          is_nothrow_callable will always
>          // return false because 'noexcept' is not part of the
>          function type.
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> 


More information about the cfe-commits mailing list