rsmith added a comment.
I think this would be an interesting test:
struct S {
/*not constexpr*/ S();
constexpr ~S() {}
};
S s; // no warning
struct T {
/*not constexpr*/ T();
constexpr ~T() { if (b) {} }
bool b;
};
T t; // expected-warning {{exit-time destructor}}
(For a non-`constexpr` variable with a `constexpr` destructor, our behaviour
depends on whether the destructor call is a constant expression.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149713/new/
https://reviews.llvm.org/D149713
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits