http://llvm.org/bugs/show_bug.cgi?id=9983

           Summary: clang crashes when using std::bind with a non-static
                    method
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Created an attachment (id=6627)
 --> (http://llvm.org/bugs/attachment.cgi?id=6627)
Preprocessed source

The following code (preprocessed version attached) crashes clang trunk with
libc++ trunk:

#include <functional>

struct Container {
    void lookup() const {}
};

void lookup(Container&) {}


template <typename Functor>
static void foo(Functor f)
{
    f();
}


int main(int, char**)
{
    Container    c;
    foo(std::bind(&Container::lookup, c));    // A
    //foo(std::bind(&lookup, c));            // B
}


$ ~/LLVM/build/Debug+Asserts/bin/clang -std=c++0x -stdlib=libc++ clang.cpp
Assertion failed: (false && "Not an overloaded operator"), function
mangleOperatorName, file
/Users/rynnsauer/LLVM/llvm/tools/clang/lib/AST/ItaniumMangle.cpp, line 1435.

(Full crash log attached)


Commenting line (A) and uncommenting line (B) results in a successful compile.

My clang version:

$ ~/LLVM/build/Debug+Asserts/bin/clang --versionclang version 3.0 (trunk
131844)
Target: x86_64-apple-darwin10.7.0
Thread model: posix


My libc++ version:

$ svn info .
[...]
Revision: 131842

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to