https://bugs.llvm.org/show_bug.cgi?id=48741
Bug ID: 48741
Summary: Using constexpr variable in pragma fails with
"reference to local variable" when using auto lambda
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Here is a pretty minimal reproduction:
```
template <typename F> void caller(const F &f) { f(0); }
template <typename T> void f() {
constexpr unsigned v = 8;
caller([=](auto) {
#pragma unroll v
for (;;) {
}
});
}
int main() { f<int>(); }
```
https://godbolt.org/z/9o3chf
The issue occurs with -std=c++14 on all version of clang after 4.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs