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

            Bug ID: 38623
           Summary: Assertion in CodeGen fails when a reference to a
                    global variable is captured by a block
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: ahata...@gmail.com
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

$ cat test.cpp
int b;

void test() {
  int &a = b;
  ^{ a = 2; };
}

$ clang++ -c -o /dev/null test.cpp

Assertion failed: (it != Captures.end() && "no entry for variable!"), function
getCapture, file llvm/tools/clang/lib/CodeGen/CGBlocks.h, line 277.

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