[clang] [clang-tools-extra] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 07:16:23 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 21ef187654c819fd097171afcc6c9855dccdb36d 82bf13532bb3980fbe55c56c2977c5dcbb654c80 -- clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.cpp clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.cpp clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp clang-tools-extra/clang-tidy/cppcoreguidelines/RvalueReferenceParamNotMovedCheck.cpp clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp clang/include/clang/ASTMatchers/ASTMatchers.h
``````````

</details>

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

``````````diff
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
index 2a9726f32f..e348fe8f13 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
@@ -87,10 +87,12 @@ void MakeSmartPtrCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
               cxxConstructExpr(
                   hasType(getSmartPointerTypeMatcher()), argumentCountIs(1),
                   hasArgument(
-                      0, ignoringParenImpCasts(cxxNewExpr(hasType(pointsTo(qualType(hasCanonicalType(
-                                        equalsBoundNode(PointerType))))),
-                                    CanCallCtor, unless(IsPlacement)))
-                             .bind(NewExpression)),
+                      0,
+                      ignoringParenImpCasts(
+                          cxxNewExpr(hasType(pointsTo(qualType(hasCanonicalType(
+                                         equalsBoundNode(PointerType))))),
+                                     CanCallCtor, unless(IsPlacement)))
+                          .bind(NewExpression)),
                   unless(isInTemplateInstantiation()))
                   .bind(ConstructorCall))))),
       this);

``````````

</details>


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


More information about the cfe-commits mailing list