[clang] [clang][NFC] Add missing placement-new after Allocate() calls (PR #68382)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 22:08:23 PDT 2023


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 a06e94cf3b375cdfd81f42f60e16ce0c3783ff4a d987a8523086ab8b6d49f395429afda75769a731 -- clang/lib/AST/DeclCXX.cpp clang/lib/AST/DeclObjC.cpp clang/lib/Serialization/ASTReaderDecl.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 7bf1bcceccf5..6a2f607d916c 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -2002,7 +2002,8 @@ void ASTDeclReader::ReadCXXDefinitionData(
       case LCK_StarThis:
       case LCK_This:
       case LCK_VLAType:
-        new (ToCapture) Capture(Loc, IsImplicit, Kind, nullptr,SourceLocation());
+        new (ToCapture)
+            Capture(Loc, IsImplicit, Kind, nullptr, SourceLocation());
         ToCapture++;
         break;
       case LCK_ByCopy:

``````````

</details>


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


More information about the cfe-commits mailing list