aaron.ballman added a comment. In D117391#3301696 <https://reviews.llvm.org/D117391#3301696>, @kimgr wrote:
> @aaron.ballman Thanks for the valuable feedback! > >> Assuming that the `to_lvalue_ref(A{})` case should diagnose, then yes, I >> agree, I think the `ret_a()` portion should as well. > > My primary focus is not to make sure Clang follows the standard closely for > `consteval`, but rather to make sure it's self-consistent and doesn't provoke > undefined behavior for `consteval` inputs. Agreed, but if self-consistency takes us further away from standards conformance, then we've got other problems to solve (and potentially need to solve those first). > So another way to think about it is that `to_lvalue_ref` and `ret_a` might > both diagnose, or not, but absence of diagnostics should not be a result of > misinterpreting the AST the way we do now. Yup! > I'm preparing a different patch to do the short-circuiting in > `skipImplicitTemporary`, so we can more easily compare and contrast. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117391/new/ https://reviews.llvm.org/D117391 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits