Skip to content

Commit

Permalink
refactor: isCXXSrcFile accepts C files
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Jan 23, 2024
1 parent f53685e commit 14e3a33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/Lib/MrDocsCompilationDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ bool
isCXXSrcFile(
std::string_view filename)
{
return driver::types::isCXX(
driver::types::lookupTypeForExtension(
llvm::sys::path::extension(filename).drop_front()));
StringRef ext = llvm::sys::path::extension(filename).drop_front();
driver::types::ID extensionId = driver::types::lookupTypeForExtension(ext);
return driver::types::isCXX(extensionId) || ext == "c";
}

template<typename... Opts>
Expand Down

0 comments on commit 14e3a33

Please sign in to comment.