[llvm-bugs] [Bug 50207] New: call to constexpr variadic class member function is not emitted (and triggers warning)
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 3 09:46:47 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50207
Bug ID: 50207
Summary: call to constexpr variadic class member function is
not emitted (and triggers warning)
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: ldalessandro at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
In the following example, the call to `foo` is not emitted.
```
struct Foo {
constexpr static int bar() {
return foo(42);
}
constexpr static int foo(int, auto...) {
return 0;
}
};
// warning: inline function 'Foo::foo<>' is not defined [-Wundefined-inline]
int i = Foo::bar();
```
1. If I reorder the definitions of `bar` and `foo` this works fine.
2. If I add some unused function `car` after the definition of `foo` this works
fine.
3. If foo is not a variadic template it works fine.
3. The `static`ness if the function is irrelevant, just makes the example
smaller.
See a working version at https://godbolt.org/z/dKqze6fKn.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210503/88478fa6/attachment.html>
More information about the llvm-bugs
mailing list