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

            Bug ID: 39066
           Summary: Clang should warn on returning a lambda which captures
                    locals by reference.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: chandl...@gmail.com
                CC: llvm-bugs@lists.llvm.org, rtr...@google.com

consider: https://gcc.godbolt.org/z/uB6Xar

Clang should warn on returning a lambda with a local captured by reference.
This seems ... really unlikely to be correct (although technically possible).

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