diff --git a/src/Compiler/Command.cpp b/src/Compiler/Command.cpp index 2cf3b91a..04c1825f 100644 --- a/src/Compiler/Command.cpp +++ b/src/Compiler/Command.cpp @@ -690,8 +690,11 @@ CompilationContext CompilationDatabase::lookup(llvm::StringRef file, if(info) { directory = self->strings.get(info->directory); arguments = self->mangle_command(file, *info, options); - } else { + // TODO: other c++ suffixes + } else if(file.ends_with(".cpp") || file.ends_with(".hpp") || file.ends_with(".cc")) { arguments = {"clang++", "-std=c++20"}; + } else { + arguments = {"clang"}; } auto append_arg = [&](llvm::StringRef s) {