[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction
Kim Gräsman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 7 10:02:06 PST 2022
kimgr added a comment.
@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.
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.
I'm preparing a different patch to do the short-circuiting in `skipImplicitTemporary`, so we can more easily compare and contrast.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117391/new/
https://reviews.llvm.org/D117391
More information about the cfe-commits
mailing list