[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 9 15:20:59 PDT 2025


================
@@ -7653,8 +7653,11 @@ ExprResult Sema::TemporaryMaterializationConversion(Expr *E) {
   // In C++98, we don't want to implicitly create an xvalue.
   // FIXME: This means that AST consumers need to deal with "prvalues" that
   // denote materialized temporaries. Maybe we should add another ValueKind
-  // for "xvalue pretending to be a prvalue" for C++98 support.
-  if (!E->isPRValue() || !getLangOpts().CPlusPlus11)
+  // for "xvalue pretending to be a prvalue" for C++98 support. C11 added the
----------------
efriedma-quic wrote:

Maybe reorganize this comment so the description of C11 rules isn't part of the "FIXME"?

https://github.com/llvm/llvm-project/pull/133472


More information about the cfe-commits mailing list