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: unassignedclangb...@nondot.org
Reporter: com...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs