[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 11:03:04 PDT 2024


================
@@ -8900,7 +8900,8 @@ void Sema::CheckMemaccessArguments(const CallExpr *Call,
           << Call->getCallee()->getSourceRange());
     else if (const auto *RT = PointeeTy->getAs<RecordType>()) {
 
-      bool IsTriviallyCopyableCXXRecord =
+      bool MayBeTriviallyCopyableCXXRecord =
+          RT->isIncompleteType() ||
----------------
serge-sans-paille wrote:

According to https://godbolt.org/z/xcnb154de having fields that point to incomplete types does not make you non trivially copyable, so I'm not even sure it reduces the quality of the original warning.

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


More information about the cfe-commits mailing list