Treat source filenames with no dot as -x c++-header

This commit is contained in:
Fangrui Song 2018-01-07 21:13:12 -08:00
parent 11436c1f0d
commit a2faa0c519

View File

@ -90,6 +90,8 @@ optional<std::string> SourceFileType(const std::string& path) {
return std::string("objective-c++");
else if (EndsWith(path, ".m"))
return std::string("objective-c");
else if (path.find('.') == std::string::npos)
return std::string("c++-header");
return nullopt;
}