Fix project.cc unit tests.

-x processing broke.
This commit is contained in:
Jacob Dufault 2017-12-15 21:05:48 -08:00
parent 5238c50027
commit 487680e8d1

View File

@ -190,7 +190,7 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
// Clang does not have good hueristics for determining source language, we
// should explicitly specify it.
if (auto source_file_type = SourceFileType(entry.file)) {
if (AnyStartsWith(result.args, "-x")) {
if (!AnyStartsWith(result.args, "-x")) {
result.args.push_back("-x" + *source_file_type);
}
if (!AnyStartsWith(result.args, "-std=")) {