[clang] [C] Diagnose use of C++ keywords in C (PR #137234)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 24 11:59:26 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 cpp,c,h -- clang/test/Sema/c++-keyword-in-c.c clang/include/clang/Basic/IdentifierTable.h clang/lib/Basic/IdentifierTable.cpp clang/lib/Sema/SemaDecl.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 74432ea34..f02050d9a 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -6108,7 +6108,7 @@ static bool isFromSystemHeader(SourceManager &SM, const Decl *D) {
SM.isInSystemMacro(D->getLocation());
}
-static bool isKeywordInCPlusPlus(const Sema &S, const IdentifierInfo* II) {
+static bool isKeywordInCPlusPlus(const Sema &S, const IdentifierInfo *II) {
if (!II)
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/137234
More information about the cfe-commits
mailing list