[PATCH] D23628: Fix unittests after windows command line parsing

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 14:46:16 PDT 2016


zturner created this revision.
zturner added a reviewer: alexfh.
zturner added a subscriber: cfe-commits.
Herald added a subscriber: klimek.

After submitting the windows command line parsing patch, it broke all the command line parsing unittests, because now they were trying parse gnu command lines using the windows command line parser.  The patch is reverted for now until we get these unit tests fixed.

I'm not sure what the best solution is.  One option is to disable those tests on Windows.  But that seems undesirable because it was only some of the tests, and others worked fine.  Not all the tests even depended on a command line in the first place.  So I decided to expose the command syntax through the API.  You can either force it to Gnu, force it to Windows, and let it auto-detect.  The unit tests all force it to Gnu for the sake of simplicity, since the Windows command line tokenizer is already rigorously tested in LLVM.

This also kind of lines up with the idea I had in the previous code review for exposing a command line option in `CommonOptions.cpp` to override the command syntax so we don't have to guess.  So if someone decides to do that in the future that should be easier now.

https://reviews.llvm.org/D23628

Files:
  include/clang/Tooling/JSONCompilationDatabase.h
  lib/Tooling/JSONCompilationDatabase.cpp
  unittests/Tooling/CompilationDatabaseTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23628.68426.patch
Type: text/x-patch
Size: 13605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160817/9f7acf69/attachment-0001.bin>


More information about the cfe-commits mailing list