[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 08:08: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 d486a4c29a331d3bfb3649a8a0aa2ba4970a6455 1a46c4d8bd22f8802058a1865a3b18d5aa4f2cd4 -- clang/lib/Sema/SemaExprObjC.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index bdc16687e8..07e927cef3 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -2441,10 +2441,11 @@ ExprResult Sema::BuildClassMessageImplicit(QualType ReceiverType,
          "Either the super receiver location needs to be valid or the receiver "
          "needs valid type source information");
   if (receiverTypeInfo) {
-    return BuildClassMessage(receiverTypeInfo, ReceiverType,
-                            /*SuperLoc=*/isSuperReceiver ? Loc : SourceLocation(),
-                             Sel, Method, Loc, Loc, Loc, Args,
-                             /*isImplicit=*/true);
+    return BuildClassMessage(
+        receiverTypeInfo, ReceiverType,
+        /*SuperLoc=*/isSuperReceiver ? Loc : SourceLocation(), Sel, Method, Loc,
+        Loc, Loc, Args,
+        /*isImplicit=*/true);
   }
 }
 

``````````

</details>


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


More information about the cfe-commits mailing list