https://bugs.llvm.org/show_bug.cgi?id=48027
Bug ID: 48027
Summary: -Winvalid-constexpr fails to warn when calling
non-constexpr method on field
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
The below should warn that y() can never be constant evaluated, but fails to as
of current trunk. Either of the following changes will restore the warning:
- Changing `void x()` to `static void x()`
- Changing `constexpr void y()` to `constexpr void y(X x)`
struct X {
void x();
};
struct Y {
X x;
constexpr void y() { x.x(); }
};
--
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