https://llvm.org/bugs/show_bug.cgi?id=25661

            Bug ID: 25661
           Summary: Clang frontend doesn't deal with class member function
                    pointer passed as template argument correctly on
                    Windows
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This seems a regression of Windows targets in Clang 3.5 and it's reproducible
in the trunk.

$ cat test.cpp
template<typename T>
struct is_function
{
    static constexpr bool value = false;
};
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...)>
{
    static constexpr bool value = true;
};

template<typename>
struct helper {};
template<typename _Tp, typename _Cp>
struct helper<_Tp _Cp::*> : public is_function<_Tp> {};

class class_type {};
static_assert(
    helper<void(class_type::*)()>::value
  , "void(class_type::*)() IS a member function pointer");


$ clang-3.4/bin/clang -c -std=c++11 -target x86_64-unknown-linux-gnu test.cpp
$ clang-3.4/bin/clang -c -std=c++11 -target i686-pc-mingw32 test.cpp

$ clang-3.5/bin/clang -c -std=c++11 -target x86_64-unknown-linux-gnu test.cpp
$ clang-3.5/bin/clang -c -std=c++11 -target i686-pc-mingw32 test.cpp
test.cpp:19:1: error: static_assert failed "void(class_type::*)() IS a member
function pointer"
static_assert(
^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to