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: unassignedclangb...@nondot.org
Reporter: ldalessan...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs