[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 12 04:00:21 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 3358838446428976a41390fde98fe5b04b08a132 a7ff71da99cd158e9bc608b43577cb854dfc7fae -- clang/test/SemaCXX/is-trivially-relocatable.cpp clang/include/clang/AST/DeclCXX.h clang/lib/AST/DeclCXX.cpp clang/lib/AST/Type.cpp clang/test/SemaCXX/attr-trivial-abi.cpp clang/test/SemaCXX/type-traits.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index 5811e746b0..a800d611fd 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -885,7 +885,8 @@ void CXXRecordDecl::addedMember(Decl *D) {
       SMKind |= SMF_MoveAssignment;
     }
 
-    if (Method->isUserProvided() && (Method->isCopyAssignment() || Method->isMoveAssignment()))
+    if (Method->isUserProvided() &&
+        (Method->isCopyAssignment() || Method->isMoveAssignment()))
       data().IsNaturallyTriviallyRelocatable = false;
 
     // Keep the list of conversion functions up-to-date.

``````````

</details>


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


More information about the cfe-commits mailing list