Issue 61566
Summary Pointless -Wundefined-internal warning from concept checks
Labels new issue
Assignees
Reporter timsong-cpp
    ```cpp
auto begin(auto&& r) {
    return r.begin();
}

template<class T>
concept Range = requires (T t) { ::begin(t); };

namespace {
    struct R {
        int* begin();
    };
}

static_assert(Range<R>);
```
Here, I'm just trying to check the concept; nothing is actually calling `::begin` or `R::begin`. Yet clang warns:
```
<source>:10:14: warning: function '(anonymous namespace)::R::begin' has internal linkage but is not defined [-Wundefined-internal]
        int* begin();
 ^
<source>:2:14: note: used here
    return r.begin();
 ^
```


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to