[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 17:34:11 PST 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 4d89356fef1a568de790ad8b3f53dc494b461e5b b702fcca1b4c5924ce4740d054e396aa4bc67e97 -- clang/test/Analysis/suppression-attr.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp clang/lib/StaticAnalyzer/Core/BugSuppression.cpp clang/test/Analysis/Checkers/WebKit/ref-cntbl-base-virtual-dtor.cpp clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp clang/test/Analysis/Checkers/WebKit/uncounted-members.cpp clang/test/Analysis/suppression-attr-doc.cpp clang/test/SemaCXX/attr-suppress.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
index 4f8750d9f1..2f2df63468 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
@@ -161,8 +161,8 @@ static void checkObjCUnusedIvar(const ObjCImplementationDecl *D,
 
       PathDiagnosticLocation L =
           PathDiagnosticLocation::create(Ivar, BR.getSourceManager());
-      BR.EmitBasicReport(ID, Checker, "Unused instance variable", "Optimization",
-                         os.str(), L);
+      BR.EmitBasicReport(ID, Checker, "Unused instance variable",
+                         "Optimization", os.str(), L);
     }
 }
 

``````````

</details>


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


More information about the cfe-commits mailing list