[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-09-18 Thread Luboš Luňák via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372248: make -frewrite-includes also rewrite conditions in #if/#elif (authored by llunak, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-09-17 Thread Tor Arne Vestbø via Phabricator via cfe-commits
torarnv added a comment. Thank you for the explanation!  Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63508/new/ https://reviews.llvm.org/D63508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-09-17 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D63508#1671776 , @torarnv wrote: > So, this will make `-frewrite-includes` do more work, to ensure that it not > only covers the "top level" `#include` or `__has_include` case, but also > `__has_include` in one or more levels

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-09-16 Thread Tor Arne Vestbø via Phabricator via cfe-commits
torarnv added a comment. Just for understanding what's going on here, I'm going to ask some stupid questions  So, this will make `-frewrite-includes` do more work, to ensure that it not only covers the "top level" `#include` or `__has_include` case, but also `__has_include` in one or more

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-09-16 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. I've noticed that the Developer Policy says that it's actually allowed to commit patches without approval for parts "that you have contributed or maintain". Given that I'm the author of -rewrite-includes I take it that it's ok if I commit this if there are no further

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-09-16 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 220378. llunak added a comment. - updated to apply to current trunk - changed misleading condition in a test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63508/new/ https://reviews.llvm.org/D63508 Files:

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-08-31 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. Ping? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63508/new/ https://reviews.llvm.org/D63508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-07-16 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added inline comments. Comment at: clang/test/Frontend/rewrite-includes-conditions.c:17 +line4 +#elif value2 < value2 +line5 rsmith wrote: > Did you mean for this to be `value1 < value2` rather than `value2 < value2`? Yes, not that it'd matter in

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/Frontend/rewrite-includes-conditions.c:17 +line4 +#elif value2 < value2 +line5 Did you mean for this to be `value1 < value2` rather than `value2 < value2`? Comment at:

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-30 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 207229. llunak added a comment. Updated the patch again, commenting out just a part of #if didn't work either, so it seems there's no good way to comment out unwanted #if. This patch surrounds rewritten #if conditions by extra #if 0 #endif block to disable

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-30 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 207220. llunak added a comment. Updated patch, removed ()'s around 1/0, fixed to use CommentOutDirective(). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63508/new/ https://reviews.llvm.org/D63508 Files:

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-30 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D63508#1558390 , @rsmith wrote: > Patch generally looks good; just a minor concern about the output format. > Also, we don't need parentheses around the constant 0 or 1. That was consistent with what the current code does,

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Patch generally looks good; just a minor concern about the output format. Comment at: clang/lib/Frontend/Rewrite/InclusionRewriter.cpp:487-490 +OS << " - evaluated by -frewrite-includes */" << MainEOL; +OS << (elif ? "#elif" :

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-21 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. Implemented in the current version of the patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63508/new/ https://reviews.llvm.org/D63508 ___ cfe-commits mailing list

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-21 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 206070. llunak retitled this revision from "make -frewrite-includes handle __has_include wrapped in a macro" to "make -frewrite-includes also rewrite conditions in #if/#elif". llunak edited the summary of this revision. Repository: rC Clang CHANGES SINCE