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 origin/main HEAD --extensions cpp,h --
clang/include/clang/Analysis/RetainSummaryManager.h
clang/lib/Analysis/RetainSummaryManager.cpp
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Analysis/RetainSummaryManager.h
b/clang/include/clang/Analysis/RetainSummaryManager.h
index 7b787eb96..a0f396799 100644
--- a/clang/include/clang/Analysis/RetainSummaryManager.h
+++ b/clang/include/clang/Analysis/RetainSummaryManager.h
@@ -649,11 +649,10 @@ public:
bool isTrustedReferenceCountImplementation(const Decl *FD);
- const RetainSummary *getSummary(AnyCall C,
- bool HasNonZeroCallbackArg=false,
- bool IsReceiverUnconsumedSelf=false,
- QualType ReceiverType={},
- bool ReceiverIsClassObj=false);
+ const RetainSummary *getSummary(AnyCall C, bool HasNonZeroCallbackArg =
false,
+ bool IsReceiverUnconsumedSelf = false,
+ QualType ReceiverType = {},
+ bool ReceiverIsClassObj = false);
RetEffect getObjAllocRetEffect() const { return ObjCAllocRetE; }
diff --git a/clang/lib/Analysis/RetainSummaryManager.cpp
b/clang/lib/Analysis/RetainSummaryManager.cpp
index ecada3bb2..c7a438141 100644
--- a/clang/lib/Analysis/RetainSummaryManager.cpp
+++ b/clang/lib/Analysis/RetainSummaryManager.cpp
@@ -655,12 +655,9 @@ void RetainSummaryManager::updateSummaryForArgumentTypes(
}
}
-const RetainSummary *
-RetainSummaryManager::getSummary(AnyCall C,
- bool HasNonZeroCallbackArg,
- bool IsReceiverUnconsumedSelf,
- QualType ReceiverType,
- bool ReceiverIsClassObj) {
+const RetainSummary *RetainSummaryManager::getSummary(
+ AnyCall C, bool HasNonZeroCallbackArg, bool IsReceiverUnconsumedSelf,
+ QualType ReceiverType, bool ReceiverIsClassObj) {
const RetainSummary *Summ;
switch (C.getKind()) {
case AnyCall::Function:
@@ -699,7 +696,6 @@ RetainSummaryManager::getSummary(AnyCall C,
return Summ;
}
-
const RetainSummary *
RetainSummaryManager::getCFCreateGetRuleSummary(const FunctionDecl *FD) {
if (coreFoundation::followsCreateRule(FD))
@@ -1123,9 +1119,7 @@ RetainSummaryManager::getClassMethodSummary(const
ObjCMessageExpr *ME) {
}
const RetainSummary *RetainSummaryManager::getInstanceMethodSummary(
- const ObjCMessageExpr *ME,
- QualType ReceiverType,
- bool ReceiverIsClassObj) {
+ const ObjCMessageExpr *ME, QualType ReceiverType, bool ReceiverIsClassObj)
{
const ObjCInterfaceDecl *ReceiverClass = nullptr;
// We do better tracking of the type of the object than the core ExprEngine.
diff --git
a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
index 86f54de92..2df0d9f15 100644
---
a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
+++
b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
@@ -348,9 +348,10 @@ static bool isReceiverUnconsumedSelf(const CallEvent
&Call) {
return false;
}
-static const RetainSummary *
-getSummary(RetainSummaryManager &Summaries, const CallEvent &Call,
- QualType ReceiverType, bool ReceiverIsClassObj = false) {
+static const RetainSummary *getSummary(RetainSummaryManager &Summaries,
+ const CallEvent &Call,
+ QualType ReceiverType,
+ bool ReceiverIsClassObj = false) {
const Expr *CE = Call.getOriginExpr();
AnyCall C =
CE ? *AnyCall::forExpr(CE)
@@ -379,7 +380,8 @@ void RetainCountChecker::checkPostCall(const CallEvent
&Call,
}
}
- const RetainSummary *Summ = getSummary(Summaries, Call, ReceiverType,
ReceiverIsClassObj);
+ const RetainSummary *Summ =
+ getSummary(Summaries, Call, ReceiverType, ReceiverIsClassObj);
if (C.wasInlined) {
processSummaryOfInlined(*Summ, Call, C);
``````````
</details>
https://github.com/llvm/llvm-project/pull/206378
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits