[LLVMbugs] [Bug 21546] New: Cannot mark lambda operator() as noreturn

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 12 06:11:34 PST 2014


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

            Bug ID: 21546
           Summary: Cannot mark lambda operator() as noreturn
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Minimal example:

#include<iostream>
int main() {
  []() [[noreturn]] { std::exit(1); }();
  return 0;
}

produces: "error: 'noreturn' attribute cannot be applied to types"

Under gcc this works fine. 

I don't know where should one put [[noreturn]], but there should be a way to
mark the operator() of a lambda as noreturn.

-- 
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/20141112/53d45d03/attachment.html>


More information about the llvm-bugs mailing list