[clang] [clang][Sema] Fixed Compound Literal is not Constant Expression (PR #143852)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 06:58:52 PDT 2025
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 HEAD~1 HEAD --extensions c,h,cpp -- clang/test/Sema/gh87867.c clang/include/clang/Sema/Scope.h clang/lib/Sema/SemaExpr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Sema/Scope.h b/clang/include/clang/Sema/Scope.h
index 02ace2d7e..07b9e1bc1 100644
--- a/clang/include/clang/Sema/Scope.h
+++ b/clang/include/clang/Sema/Scope.h
@@ -428,11 +428,11 @@ public:
}
/// isInObjcMethodScope - Return true if this scope is, or is contained, in an
- /// C function body.
+ /// C function body.
bool isInCFunctionScope() const {
for (const Scope *S = this; S; S = S->getParent()) {
if (S->isFunctionScope())
- return true;
+ return true;
}
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/143852
More information about the cfe-commits
mailing list