Issue 183415
Summary Clang accepts indirectly invoking a consteval function outside of a manifestly constant evaluated context
Labels clang
Assignees
Reporter Mathusela
    https://godbolt.org/z/7rG65c13e

The following code is accepted by clang 22.0.1: 

```cpp
consteval void f(int) {}

int main() {
    auto g = []() consteval {
        return [](int x) {
            f(x);
        };
    }();

    int x = 42;
 g(x);
}
```

A PLT call to the wrapped consteval function (`f`) is emitted which invokes a linker error.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to