[PATCH] D63979: actually also compile output in tests for -frewrite-includes

2019-06-30 Thread Luboš Luňák via Phabricator via cfe-commits
llunak created this revision. llunak added a project: clang. Herald added a subscriber: cfe-commits. This depends on https://reviews.llvm.org/D63508 (where I posted one version of a patch that created broken output without the tests catching it). Repository: rC Clang https://reviews.llvm.org

[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: clang/lib/Frontend/

[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, b

[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 cfe-commits@lists.llvm.or

[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

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D63508#1550668 , @rsmith wrote: > Perhaps we should rewrite all `#if`-like directives to `#if 0` or `#if 1`? I think that would work too and it'd be in fact a reliable simple solution. Repository: rC Clang CHANGES SINCE LA

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. Icecream's usage of -frewrite-includes is not special, the purpose is always to merge everything necessary for the compilation into one source file that can be later compiled on its own as if the original file was compiled. The #include expansion done during -frewrite-in

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. The code uses a raw lexer, so it doesn't expand macros. Thus the piece of code quoted will not get the "#if QT_HAS_INCLUDE()" part rewritten. My specific use case is the Icecream distributed build tool which does remote builds in a chroot and so this #if will be false an

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-18 Thread Luboš Luňák via Phabricator via cfe-commits
llunak created this revision. llunak added reviewers: vsapsai, bkramer. llunak added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. Qt5 has a wrapper macro that makes __has_include simpler to use: #ifdef __has_include 1. define QT_HAS_INCLUDE(x) __has_include(x)

[PATCH] D61822: make -ftime-trace also print template arguments

2019-05-12 Thread Luboš Luňák via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360539: make -ftime-trace also print template arguments (authored by llunak, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61822/new/ https://reviews.llvm.

[PATCH] D61822: make -ftime-trace also print template arguments

2019-05-11 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 199133. llunak added a comment. Removed the parse case, getNameForDiagnostic() apparently prints nothing there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61822/new/ https://reviews.llvm.org/D61822 Files: lib/CodeGen/CodeGenModule.cpp lib/Sem

[PATCH] D61822: make -ftime-trace also print template arguments

2019-05-11 Thread Luboš Luňák via Phabricator via cfe-commits
llunak created this revision. llunak added a reviewer: anton-afanasyev. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without this, I get e.g. 'PerformPendingInstantiations' -> 'std::fill', now I get 'std::fill'. Repository: rC Clang https://reviews.llvm.org/D61822

<    1   2