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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to