Resubmit "[Tooling] Parse compilation database command lines on Windows."
authorZachary Turner <zturner@google.com>
Thu, 18 Aug 2016 19:31:48 +0000 (19:31 +0000)
committerZachary Turner <zturner@google.com>
Thu, 18 Aug 2016 19:31:48 +0000 (19:31 +0000)
commit9e60a2ad734e1d598f93e7148c6339795b57359c
tree22ef0e9725e79b8080a08544fed50c69fabb43c2
parent978f91ca43b1d0a59fa2f6fb6be05d547654a1da
Resubmit "[Tooling] Parse compilation database command lines on Windows."

This patch introduced the ability to decide at runtime whether to parse
JSON compilation database command lines using Gnu syntax or Windows
syntax.  However, there were many existing unit tests written that
hardcoded Gnu-specific paths.  These tests were now failing because
the auto-detection logic was choosing to parse them using Windows
rules.

This resubmission of the patch fixes this by introducing an enum
which defines the syntax mode, which defaults to auto-detect, but
for which the unit tests force Gnu style parsing.

Reviewed By: alexfh
Differential Revision: https://reviews.llvm.org/D23628

llvm-svn: 279120
clang/include/clang/Tooling/JSONCompilationDatabase.h
clang/lib/Tooling/JSONCompilationDatabase.cpp
clang/unittests/Tooling/CompilationDatabaseTest.cpp