[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-18 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. In D62115#1547705 , @skan wrote: > In D62115#1547698 , @kimgr wrote: > > > This looks good to me, thanks! > > > Could you help accept this patch? I'm not active in the project, so I don't

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-18 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D62115#1547698 , @kimgr wrote: > This looks good to me, thanks! Could you help accept this patch? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-18 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. This looks good to me, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-17 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D62115#1538631 , @kimgr wrote: > I think the test needs a bit more work. It's essentially checking the same > thing twice to exercise the Windows path separators. > > It looks like there's already a test for `-H` in >

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-17 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 205001. skan added a comment. move test case to print-header-includes.c CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 Files: lib/Frontend/HeaderIncludeGen.cpp test/Frontend/print-header-includes.c

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-11 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I think the test needs a bit more work. It's essentially checking the same thing twice to exercise the Windows path separators. It looks like there's already a test for `-H` in `FrontEnd/print-header-includes.c`. That also demonstrates the use of `--check-prefix` to

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-07 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 203664. skan added a comment. make macro more compact CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 Files: lib/Frontend/HeaderIncludeGen.cpp test/Frontend/clang_H_opt.c Index:

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-28 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-23 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 200878. skan added a comment. make test case consider Windows path separators CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 Files: lib/Frontend/HeaderIncludeGen.cpp test/Frontend/clang_H_opt.c Index:

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-22 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D62115#1511407 , @kimgr wrote: > Also, consider `././Inputs/empty.h`. Firstly, on linux write the `clang_H_opt.c` file as #include "../Index/Inputs/empty.h" #include "Inputs/empty.h" #include "./Inputs/empty.h" #include

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Also, consider `././Inputs/empty.h`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I was thinking about a testcase like: // RUN: %clang -H -fsyntax-only %s 2>&1 | FileCheck %s #include "..\Index\Inputs\empty.h" #include ".\Inputs\empty.h" // CHECK: . // CHECK-SAME: ??? // CHECK: . // CHECK-NOT: ??? // CHECK-SAME: ??? with some

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Kan Shengchen via Phabricator via cfe-commits
skan marked an inline comment as done. skan added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); lebedev.ri wrote: > skan wrote:

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 200634. skan added a comment. add a test for including headfile outside current directory. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 Files: lib/Frontend/HeaderIncludeGen.cpp

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); skan wrote: > lebedev.ri wrote: > > skan wrote: > > >

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Kan Shengchen via Phabricator via cfe-commits
skan marked an inline comment as done. skan added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); lebedev.ri wrote: > skan wrote:

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D62115#1509536 , @kimgr wrote: > Should you also consider Windows path separators here? Do you mean "\\" separator? i build llvm on windows, and use clang to complie file with -H option. The output pathname also use "/" as path

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); skan wrote: > craig.topper wrote: > > skan wrote: > > >

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Should you also consider Windows path separators here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Kan Shengchen via Phabricator via cfe-commits
skan marked an inline comment as done. skan added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); craig.topper wrote: > skan

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); skan wrote: > lebedev.ri wrote: > > xiangzhangllvm wrote: > >

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Kan Shengchen via Phabricator via cfe-commits
skan marked 2 inline comments as done. skan added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); lebedev.ri wrote: >

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); xiangzhangllvm wrote: > Need remove ";" ? This was fixed but no

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 200212. skan added a comment. remove ";" and format the code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 Files: lib/Frontend/HeaderIncludeGen.cpp test/Driver/clang_H_opt.c test/Driver/clang_H_opt.h

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:55 + // Simplify Filename that starts with "./" + if (Filename.startswith("./")); +Filename=Filename.substr(2); Need remove ";" ? Repository: rC Clang CHANGES SINCE

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:56 + if (Filename.startswith("./")); +Filename=Filename.substr(2); + Formatting Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-05-19 Thread Kan Shengchen via Phabricator via cfe-commits
skan created this revision. skan added reviewers: xiangzhangllvm, LuoYuanke, craig.topper. Herald added a project: clang. Herald added a subscriber: cfe-commits. clang behaves differently with gcc when compiling a file with -H option, gcc will omit the "./", but clang will not. I fix it to make