[clang] [C++20][Modules] Fix merging of anonymous members of class templates. (PR #155948)

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 18 12:17:29 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 origin/main HEAD --extensions h,cpp -- clang/test/Modules/merge-anon-in-template-2.cpp clang/test/Modules/merge-anon-in-template-3.cpp clang/include/clang/AST/Decl.h clang/lib/AST/Decl.cpp clang/lib/Serialization/ASTReaderDecl.cpp
``````````

: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/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index f79dea97d..d85d04d2a 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -4529,7 +4529,9 @@ public:
   }
 
   field_iterator noload_field_begin() const;
-  field_iterator noload_field_end() const { return field_iterator(decl_iterator()); }
+  field_iterator noload_field_end() const {
+    return field_iterator(decl_iterator());
+  }
 
   // Whether there are any fields (non-static data members) in this record.
   bool noload_field_empty() const {

``````````

</details>


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


More information about the cfe-commits mailing list