[llvm-branch-commits] [clang] [Clang] define memory scopes as a builtin enum (PR #185408)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Mar 9 05:40:59 PDT 2026
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 origin/main HEAD --extensions cl,cpp,c,h -- clang/test/Sema/builtin-memory-scope-conflict.c clang/test/Sema/builtin-memory-scope-shadowing.c clang/test/Sema/builtin-memory-scope.c clang/test/Sema/scoped-atomic-scope-deprecation.c clang/include/clang/AST/ASTContext.h clang/include/clang/AST/DeclID.h clang/lib/AST/ASTContext.cpp clang/lib/Frontend/InitPreprocessor.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaLookup.cpp clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/test/Preprocessor/init-aarch64.c clang/test/Preprocessor/init-loongarch.c clang/test/Preprocessor/init.c clang/test/Sema/scoped-atomic-ops.c clang/test/SemaOpenCL/atomic-ops.cl --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index fcc2f6f4a..790291f4e 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1220,7 +1220,7 @@ TypedefDecl *ASTContext::getMemoryScopeDecl() const {
if (MemoryScopeDecl)
return MemoryScopeDecl;
- // Create the enum
+ // Create the enum
#define MEMORY_SCOPE_ENUMERATORS(ENUM) \
ENUM(__memory_scope_system, 0) \
ENUM(__memory_scope_device, 1) \
``````````
</details>
https://github.com/llvm/llvm-project/pull/185408
More information about the llvm-branch-commits
mailing list