[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-06 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-06 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/67613 >From 0f63068d1085e5064d47916a86fac089c4417e57 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 27 Sep 2023 14:54:13 -0700 Subject: [PATCH 1/6] Make -frewrite-includes put an endif at the end of the

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Approved, assuming this passes CI. https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-06 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/67613 >From 0f63068d1085e5064d47916a86fac089c4417e57 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 27 Sep 2023 14:54:13 -0700 Subject: [PATCH 1/5] Make -frewrite-includes put an endif at the end of the

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The clang-format tool still has a complaint, so this isn't passing CI. Unfortunately it doesn't seem to print it in the CI, so you'll have to run it locally. Delta that, LGTM. https://github.com/llvm/llvm-project/pull/67613

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-06 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Ping https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-01 Thread Dana Jansens via cfe-commits
danakj wrote: I was just lamenting the lack of this feature this week. Thank you, I can’t wait to use it. https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/67613 >From 0f63068d1085e5064d47916a86fac089c4417e57 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 27 Sep 2023 14:54:13 -0700 Subject: [PATCH 1/4] Make -frewrite-includes put an endif at the end of the

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This looks great/useful to me. I have no problems with it, but would like to give this a bit of time for others to review. If this doesn't get other comments by friday next week, I'll approve. https://github.com/llvm/llvm-project/pull/67613

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Toggles done. Also got rid of some of the extra whitespace changes in the output. https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/67613 >From 0f63068d1085e5064d47916a86fac089c4417e57 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 27 Sep 2023 14:54:13 -0700 Subject: [PATCH 1/3] Make -frewrite-includes put an endif at the end of the

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Paul T Robinson via cfe-commits
@@ -332,12 +346,14 @@ void InclusionRewriter::CommentOutDirective(Lexer , // OutputContentUpTo() would not output anything anyway. return; } - OS << "#if 0 /* expanded by -frewrite-includes */" << MainEOL; + OS << "#if 0 /* " << getIncludedFileName(Inc)

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Erich Keane via cfe-commits
@@ -332,12 +346,14 @@ void InclusionRewriter::CommentOutDirective(Lexer , // OutputContentUpTo() would not output anything anyway. return; } - OS << "#if 0 /* expanded by -frewrite-includes */" << MainEOL; + OS << "#if 0 /* " << getIncludedFileName(Inc)

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Paul T Robinson via cfe-commits
@@ -332,12 +346,14 @@ void InclusionRewriter::CommentOutDirective(Lexer , // OutputContentUpTo() would not output anything anyway. return; } - OS << "#if 0 /* expanded by -frewrite-includes */" << MainEOL; + OS << "#if 0 /* " << getIncludedFileName(Inc)

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-29 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/67613 >From 0f63068d1085e5064d47916a86fac089c4417e57 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 27 Sep 2023 14:54:13 -0700 Subject: [PATCH 1/2] Make -frewrite-includes put an endif at the end of the

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-28 Thread Paul T Robinson via cfe-commits
@@ -98,7 +98,7 @@ // == file2.h // REWRITE: #if 0 // REWRITE: #include "file2.h" -// REWRITE: #endif +// REWRITE: #else /* file2.h expanded pogo59 wrote: Yes it does, but the point here is simply to identify that this is the correct `#else`. The Preprocessor

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-28 Thread Fangrui Song via cfe-commits
@@ -98,7 +98,7 @@ // == file2.h // REWRITE: #if 0 // REWRITE: #include "file2.h" -// REWRITE: #endif +// REWRITE: #else /* file2.h expanded MaskRay wrote: Does this line not have `by -frewrite-includes`? https://github.com/llvm/llvm-project/pull/67613

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-28 Thread Erich Keane via cfe-commits
@@ -332,12 +346,14 @@ void InclusionRewriter::CommentOutDirective(Lexer , // OutputContentUpTo() would not output anything anyway. return; } - OS << "#if 0 /* expanded by -frewrite-includes */" << MainEOL; + OS << "#if 0 /* " << getIncludedFileName(Inc)

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: >From what I can tell, this looks correct, though I don't know much about this >rewriter, I've only spent a little time reviewing it. That said, i think this >is a very nice improvement. One thing I might request (in addition to what I did in teh

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-27 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8ff77a8f04e5a385115c1790a5f03ec263a00faf 0f63068d1085e5064d47916a86fac089c4417e57 --

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Changes Also add the filename to the comments it emits, to help identify where included text ends. --- Patch is 25.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/67613.diff 5 Files

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-09-27 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 created https://github.com/llvm/llvm-project/pull/67613 Also add the filename to the comments it emits, to help identify where included text ends. >From 0f63068d1085e5064d47916a86fac089c4417e57 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 27 Sep 2023