[clang] [clang][Analysis][NFC] Let isConfigurationValue take Expr (PR #116266)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 14 10:16:49 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 e8c07f7458285c6fb2eddff5b7914519de10474d b58bf4d9b7f0757f2208b6c77eff6aeeca07efa4 --extensions cpp -- clang/lib/Analysis/ReachableCode.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Analysis/ReachableCode.cpp b/clang/lib/Analysis/ReachableCode.cpp
index f5f7e924b8..b1ea8cfa83 100644
--- a/clang/lib/Analysis/ReachableCode.cpp
+++ b/clang/lib/Analysis/ReachableCode.cpp
@@ -207,10 +207,10 @@ static bool isConfigurationValue(const Expr *E, Preprocessor &PP,
   bool IgnoreYES_NO = false;
 
   switch (E->getStmtClass()) {
-    case Stmt::CallExprClass: {
-      const FunctionDecl *Callee =
+  case Stmt::CallExprClass: {
+    const FunctionDecl *Callee =
         dyn_cast_or_null<FunctionDecl>(cast<CallExpr>(E)->getCalleeDecl());
-      return Callee ? Callee->isConstexpr() : false;
+    return Callee ? Callee->isConstexpr() : false;
     }
     case Stmt::DeclRefExprClass:
       return isConfigurationValue(cast<DeclRefExpr>(E)->getDecl(), PP);
@@ -262,7 +262,7 @@ static bool isConfigurationValue(const Expr *E, Preprocessor &PP,
     }
     default:
       return false;
-  }
+    }
 }
 
 static bool isConfigurationValue(const ValueDecl *D, Preprocessor &PP) {

``````````

</details>


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


More information about the cfe-commits mailing list