https://bugs.llvm.org/show_bug.cgi?id=32707

            Bug ID: 32707
           Summary: Lambda noexcept specification segfaults when capturing
                    variables
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: e...@efcs.ca
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

The following code asserts trying to `cast<T>(p)` to an incompatible type in
Sema::tryCaptureVariable:SemaExpr.cpp:14026:
> CapturingScopeInfo *CSI = cast<CapturingScopeInfo>(FSI); 

Reproducer:
// clang++ -fsyntax-only -std=c++1z test.cpp
int f(...) { return 0; }

int main() {
    [](auto arg) noexcept(noexcept(f(arg))) { }(42);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to