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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 20 18:08:16 PDT 2019


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:
> > > Need remove ";" ? 
> > This was fixed but no test was added?
> > Was some existing test failing previously? Which one?
> The test is in the file 'clang_H_opt.c'  which is included in this patch.
The extra semicolon would have caused the body of the 'if' to execute unconditionally. Did any existing test case fail for that in your local testing? Or did you not test with that mistake?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62115/new/

https://reviews.llvm.org/D62115





More information about the cfe-commits mailing list