[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread via cfe-commits

github-actions[bot] wrote:



@PeterChou1 Congratulations on having your first Pull Request (PR) merged into 
the LLVM Project!

Your changes will be combined with recent changes from other authors, then 
tested
by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with 
a build, you may recieve a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as
the builds can include changes from many authors. It is not uncommon for your
change to be included in a build that fails due to someone else's changes, or
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail 
[here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr).

If your change does cause a problem, it may be reverted, or you can revert it 
yourself.
This is a normal part of [LLVM 
development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy).
 You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are 
working as expected, well done!


https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread Björn Schäpers via cfe-commits

https://github.com/HazardyKnusperkeks closed 
https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread via cfe-commits

PeterChou1 wrote:

Thanks @owenca. I don’t have commit access, can you merge this PR for me?

https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread Owen Pan via cfe-commits

https://github.com/owenca approved this pull request.


https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread via cfe-commits

PeterChou1 wrote:

> > So I did added a simple search and replace to the generating script so now 
> > every time [[[NAME]]] is reference it will use the members name.
> 
> Nice! Though why `[[[NAME]]]` in particular? Can we use `` 
> instead?

done

https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread via cfe-commits

https://github.com/PeterChou1 updated 
https://github.com/llvm/llvm-project/pull/83415

>From 67154ff4388447ff78b2912e5635231778ed23d4 Mon Sep 17 00:00:00 2001
From: PeterChou1 <4355+peterch...@users.noreply.github.com>
Date: Thu, 29 Feb 2024 06:55:18 -0500
Subject: [PATCH 1/3] [clang][Documentation] fix documentation for clang-format

Fixes typo related to clang-format

see: https://github.com/llvm/llvm-project/issues/83207
---
 clang/docs/ClangFormatStyleOptions.rst | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/clang/docs/ClangFormatStyleOptions.rst 
b/clang/docs/ClangFormatStyleOptions.rst
index df399a229d8d4f..5b00a8f4c00fb8 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -318,9 +318,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveAssignments: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveAssignments:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -460,9 +460,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveBitFields: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveBitFields:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -602,9 +602,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveDeclarations: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveDeclarations:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -983,9 +983,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveTableGenCondOperatorColons: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveTableGenCondOperatorColons:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -1123,9 +1123,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveTableGenDefinitionColons: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveTableGenDefinitionColons:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false

>From 8a18ecf65497070ddced018fae39e330019b482f Mon Sep 17 00:00:00 2001
From: PeterChou1 
Date: Fri, 1 Mar 2024 13:31:13 -0500
Subject: [PATCH 2/3] [clang-format][doc] fix typo in doc generation for
 clang-format docs

---
 clang/docs/tools/dump_format_style.py | 1 +
 clang/include/clang/Format/Format.h   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/docs/tools/dump_format_style.py 
b/clang/docs/tools/dump_format_style.py
index af0124b94ecaf1..f45e83d432b117 100755
--- a/clang/docs/tools/dump_format_style.py
+++ b/clang/docs/tools/dump_format_style.py
@@ -129,6 +129,7 @@ def __str__(self):
 s += indent(
 "\n\nNested configuration flags:\n\n%s\n" % 
self.nested_struct, 2
 )
+s = s.replace("[[[NAME]]]", self.name)
 return s
 
 
diff --git a/clang/include/clang/Format/Format.h 
b/clang/include/clang/Format/Format.h
index 613f1fd168465d..4c5728264bf658 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -154,9 +154,9 @@ struct FormatStyle {
   /// For example, to align across empty lines and not across comments, either
   /// of these work.
   /// \code
-  ///   AlignConsecutiveMacros: AcrossEmptyLines
+  ///   [[[NAME]]]: AcrossEmptyLines
   ///
-  ///   AlignConsecutiveMacros:
+  ///   [[[NAME]]]:
   /// Enabled: true
   /// AcrossEmptyLines: true
   /// AcrossComments: false

>From b64e732f00832740ff34bd9327e8cd6358ebc400 Mon Sep 17 00:00:00 2001
From: PeterChou1 
Date: Mon, 4 Mar 2024 04:38:24 -0500
Subject: [PATCH 3/3] [clang-format][doc] rename doc generation script name

---
 clang/docs/tools/dump_format_style.py | 2 +-
 clang/include/clang/Format/Format.h   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/docs/tools/dump_format_style.py 
b/clang/docs/tools/dump_format_style.py
index f45e83d432b117..af0e658fcdc55d 100755
--- a/clang/docs/tools/dump_format_style.py
+++ b/clang/docs/tools/dump_format_style.py
@@ -129,7 +129,7 @@ def __str__(self):
 s += indent(
 "\n\nNested configuration flags:\n\n%s\n" % 
self.nested_struct, 2
 )
-s = s.replace("[[[NAME]]]", self.name)
+s = s.replace("", self.name)
 return s
 
 
diff --git a/clang/include/clang/Format/Format.h 
b/clang/include/clang/Format/Format.h
index 4c5728264bf658..590297fd89a398 100644
--- a/clang/include/clang/Format/Format.h

[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-02 Thread Owen Pan via cfe-commits

https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-02 Thread Owen Pan via cfe-commits

owenca wrote:

> So I did added a simple search and replace to the generating script so now 
> every time [[[NAME]]] is reference it will use the members name.

Nice! Though why `[[[NAME]]]` in particular? Can we use `` instead?

https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-01 Thread via cfe-commits

PeterChou1 wrote:

> Hi, you need to edit `clang/include/clang/Format/Format.h` and then run 
> `clang/docs/tools/dump_format_style.py` to regenerate 
> `clang/docs/ClangFormatStyleOptions.rst`.

Hi my mistake. I'm quite new to the LLVM project so I was not aware the docs 
were generated through a script I've updated 
Format.h however I ended up needing to change how the auto generated python doc 
worked slightly
The problem was I couldn't carry over the generated member names to the parent 
type so i did added a simple search and replace to the generating script so now 
every time [[[NAME]]] is reference it will use the members name.

I'm not sure if this is the best way to do this though let me know if there's a 
better method

https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-01 Thread via cfe-commits

https://github.com/PeterChou1 updated 
https://github.com/llvm/llvm-project/pull/83415

>From 67154ff4388447ff78b2912e5635231778ed23d4 Mon Sep 17 00:00:00 2001
From: PeterChou1 <4355+peterch...@users.noreply.github.com>
Date: Thu, 29 Feb 2024 06:55:18 -0500
Subject: [PATCH 1/2] [clang][Documentation] fix documentation for clang-format

Fixes typo related to clang-format

see: https://github.com/llvm/llvm-project/issues/83207
---
 clang/docs/ClangFormatStyleOptions.rst | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/clang/docs/ClangFormatStyleOptions.rst 
b/clang/docs/ClangFormatStyleOptions.rst
index df399a229d8d4f..5b00a8f4c00fb8 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -318,9 +318,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveAssignments: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveAssignments:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -460,9 +460,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveBitFields: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveBitFields:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -602,9 +602,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveDeclarations: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveDeclarations:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -983,9 +983,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveTableGenCondOperatorColons: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveTableGenCondOperatorColons:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false
@@ -1123,9 +1123,9 @@ the configuration (without a prefix: ``Auto``).
 
   .. code-block:: c++
 
-AlignConsecutiveMacros: AcrossEmptyLines
+AlignConsecutiveTableGenDefinitionColons: AcrossEmptyLines
 
-AlignConsecutiveMacros:
+AlignConsecutiveTableGenDefinitionColons:
   Enabled: true
   AcrossEmptyLines: true
   AcrossComments: false

>From 8a18ecf65497070ddced018fae39e330019b482f Mon Sep 17 00:00:00 2001
From: PeterChou1 
Date: Fri, 1 Mar 2024 13:31:13 -0500
Subject: [PATCH 2/2] [clang-format][doc] fix typo in doc generation for
 clang-format docs

---
 clang/docs/tools/dump_format_style.py | 1 +
 clang/include/clang/Format/Format.h   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/docs/tools/dump_format_style.py 
b/clang/docs/tools/dump_format_style.py
index af0124b94ecaf1..f45e83d432b117 100755
--- a/clang/docs/tools/dump_format_style.py
+++ b/clang/docs/tools/dump_format_style.py
@@ -129,6 +129,7 @@ def __str__(self):
 s += indent(
 "\n\nNested configuration flags:\n\n%s\n" % 
self.nested_struct, 2
 )
+s = s.replace("[[[NAME]]]", self.name)
 return s
 
 
diff --git a/clang/include/clang/Format/Format.h 
b/clang/include/clang/Format/Format.h
index 613f1fd168465d..4c5728264bf658 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -154,9 +154,9 @@ struct FormatStyle {
   /// For example, to align across empty lines and not across comments, either
   /// of these work.
   /// \code
-  ///   AlignConsecutiveMacros: AcrossEmptyLines
+  ///   [[[NAME]]]: AcrossEmptyLines
   ///
-  ///   AlignConsecutiveMacros:
+  ///   [[[NAME]]]:
   /// Enabled: true
   /// AcrossEmptyLines: true
   /// AcrossComments: false

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-02-29 Thread Owen Pan via cfe-commits

https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits