aaron.ballman added inline comments.
================ Comment at: clang/test/AST/Interp/records.cpp:208 + +struct S { + int a = 0; ---------------- Hmmm, this feels related to the discarded value results changes, but it might be a test case for a different scenario as well, so take this or leave it: ``` struct S { int &Ref; constexpr S(int &R) : Ref(R) { Ref = 0; } constexpr ~S() { Ref = 12; } }; constexpr S get_s(int &i) { return S{i}; } constexpr int func() { int i = 1; { get_s(i); } return i; } static_assert(func() == 12); ``` The idea behind the test is -- we construct the `S` object but discard its results in the compound block, but the dtor still runs as expected. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136013/new/ https://reviews.llvm.org/D136013 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits