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

            Bug ID: 20121
           Summary: -Wreturn-type fails to diagnose when a lambda contains
                    a noreturn destructor temporary
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Consider:

#include <functional>
struct NoReturnDtor {
  __attribute__((noreturn)) ~NoReturnDtor();
};
int foo() {
  std::function<void()> foo = []() { NoReturnDtor(); };
}  // expected-warning

We fail to warn about falling out of foo without returning a value.

I haven't been able to reduce away std::function by inspection yet.

-- 
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