[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 10:08:53 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 b6677835fed3a204fa043e079a135c4a225d2c0e db59f23f7dff603b00c40761c8fa935876b1654b -- clang/test/Format/main-include-char-bracket-group.cpp clang/test/Format/main-include-char-quote-group.cpp clang/test/Format/main-include-char.cpp clang/include/clang/Tooling/Inclusions/IncludeStyle.h clang/lib/Format/Format.cpp clang/lib/Tooling/Inclusions/HeaderIncludes.cpp clang/lib/Tooling/Inclusions/IncludeStyle.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/include/clang/Tooling/Inclusions/IncludeStyle.h b/clang/include/clang/Tooling/Inclusions/IncludeStyle.h
index 5ec72dac22..354c6fe28c 100644
--- a/clang/include/clang/Tooling/Inclusions/IncludeStyle.h
+++ b/clang/include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -192,8 +192,9 @@ struct ScalarEnumerationTraits<
 template <>
 struct ScalarEnumerationTraits<
     clang::tooling::IncludeStyle::MainIncludeCharDiscriminator> {
-  static void
-  enumeration(IO &IO, clang::tooling::IncludeStyle::MainIncludeCharDiscriminator &Value);
+  static void enumeration(
+      IO &IO,
+      clang::tooling::IncludeStyle::MainIncludeCharDiscriminator &Value);
 };
 
 } // namespace yaml
diff --git a/clang/lib/Tooling/Inclusions/IncludeStyle.cpp b/clang/lib/Tooling/Inclusions/IncludeStyle.cpp
index 3e756f8ff0..de3f387091 100644
--- a/clang/lib/Tooling/Inclusions/IncludeStyle.cpp
+++ b/clang/lib/Tooling/Inclusions/IncludeStyle.cpp
@@ -28,8 +28,8 @@ void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
   IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);
 }
 
-void ScalarEnumerationTraits<IncludeStyle::MainIncludeCharDiscriminator>::enumeration(
-    IO &IO, IncludeStyle::MainIncludeCharDiscriminator &Value) {
+void ScalarEnumerationTraits<IncludeStyle::MainIncludeCharDiscriminator>::
+    enumeration(IO &IO, IncludeStyle::MainIncludeCharDiscriminator &Value) {
   IO.enumCase(Value, "Quote", IncludeStyle::MICD_Quote);
   IO.enumCase(Value, "Bracket", IncludeStyle::MICD_Bracket);
   IO.enumCase(Value, "Any", IncludeStyle::MICD_Any);

``````````

</details>


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


More information about the cfe-commits mailing list