[clang] [analysis] support mutation analysis for pointee wip (PR #118593)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 22:05:40 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 4ad4d34a226043a5d594b261a9c2a50efd292a76 04e220ec2c16c65a3c785a586653ea4bc47337f5 --extensions h,cpp -- clang/include/clang/Analysis/Analyses/ExprMutationAnalyzer.h clang/lib/Analysis/ExprMutationAnalyzer.cpp clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Analysis/ExprMutationAnalyzer.cpp b/clang/lib/Analysis/ExprMutationAnalyzer.cpp
index 946d47ed17..54d45a14c9 100644
--- a/clang/lib/Analysis/ExprMutationAnalyzer.cpp
+++ b/clang/lib/Analysis/ExprMutationAnalyzer.cpp
@@ -710,9 +710,10 @@ ExprMutationAnalyzer::Analyzer::findPointeeToNonConst(const Expr *Exp) {
       varDecl(hasType(NonConstPointerOrDependentType),
               hasInitializer(expr(CanResolveToExprWithImpCast).bind("stmt")));
 
-  const auto AssignToNonConst = binaryOperation(
-      hasOperatorName("="), hasLHS(expr(hasType(NonConstPointerOrDependentType))),
-      hasRHS(CanResolveToExprWithImpCast));
+  const auto AssignToNonConst =
+      binaryOperation(hasOperatorName("="),
+                      hasLHS(expr(hasType(NonConstPointerOrDependentType))),
+                      hasRHS(CanResolveToExprWithImpCast));
 
   const auto ArgOfInstantiationDependent = allOf(
       hasAnyArgument(CanResolveToExprWithImpCast), isInstantiationDependent());

``````````

</details>


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


More information about the cfe-commits mailing list