[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 15:16:15 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 561c42df5712c346d4de2e6499b06712403d3164 dfa0b6b840b1ab12c27b7203ab372bd147885173 -- clang/lib/Sema/SemaChecking.cpp clang/test/Sema/atomic-ops.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index f91ab833b4..85d1b2f72c 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -8499,7 +8499,7 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
         << /*is non object*/ 0 << ExprRange;
     return ExprError();
   }
-  
+
   if (Args.size() > AdjustedNumArgs) {
     Diag(Args[AdjustedNumArgs]->getBeginLoc(),
          diag::err_typecheck_call_too_many_args)

``````````

</details>


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


More information about the cfe-commits mailing list