From 487680e8d16b11898b3aa9e2dde250cf64259b01 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Fri, 15 Dec 2017 21:05:48 -0800 Subject: [PATCH] Fix project.cc unit tests. -x processing broke. --- src/project.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project.cc b/src/project.cc index 627b6c54..6fbee8ff 100644 --- a/src/project.cc +++ b/src/project.cc @@ -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=")) {