[LLVMbugs] [Bug 19249] New: lambda crash (hard to explain without source)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 25 13:28:43 PDT 2014


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

            Bug ID: 19249
           Summary: lambda crash (hard to explain without source)
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: farwayer at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#include <functional>

int ttt(std::function<void()> const &f) {
    return 0;
}

int main() {
    auto x = ttt([&x] {});
    return 0;
}

The most important that you will try to catch to closure *auto* variable
returned from function where you pass lambda.

So this code compiling without problem:

int main() {
    int x = ttt([&x] {});
    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140325/87732231/attachment.html>


More information about the llvm-bugs mailing list