[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 22:41:17 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 21ef187654c819fd097171afcc6c9855dccdb36d 0ee6abe93159a29052af3ef9befff6a7e029eb31 -- clang/test/CXX/stmt.stmt/stmt.return/p6.cpp clang/lib/Sema/SemaInit.cpp clang/test/CXX/drs/cwg650.cpp clang/test/SemaCXX/type-traits.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index d22ab1311d..34f340333a 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -8373,7 +8373,8 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity,
         // copy-initialization of a temporary of the appropriate type, which for
         // this expression is identical to the return statement (since NRVO
         // doesn't apply), and not really build a `return create<From>()` in
-        // type traits expression evaluation. Therefor, P2748R5 has no impact for
+        // type traits expression evaluation. Therefor, P2748R5 has no impact
+        // for
         // {__is_convertible, __is_nothrow_convertible, __is_convertible_to}
         // evaluation.
         //

``````````

</details>


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


More information about the cfe-commits mailing list