-x c++-header has implicit -std=c++14

This commit is contained in:
Fangrui Song 2018-01-07 21:18:02 -08:00
parent a2faa0c519
commit 63178468eb

View File

@ -154,7 +154,7 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
if (!AnyStartsWith(entry.args, "-std=")) {
if (*source_file_type == "c")
result.args.push_back("-std=gnu11");
else if (*source_file_type == "c++")
else if (*source_file_type == "c++" || *source_file_type == "c++-header")
result.args.push_back("-std=c++14");
}
}