Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ cquery has system include path detection (through running the compiler driver) w
# >>> [Getting started](../../wiki/Home) (CLICK HERE) <<<

* [Build](../../wiki/Build)
* [Client feature table](../../wiki/Client-feature-table)
* [FAQ](../../wiki/FAQ)

ccls can index itself (~180MiB RSS when idle, noted on 2018-09-01), FreeBSD, glibc, Linux, LLVM (~1800MiB RSS), musl (~60MiB RSS), ... with decent memory footprint. See [wiki/compile_commands.json](../../wiki/compile_commands.json) for examples.
3 changes: 2 additions & 1 deletion src/indexer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ class IndexDataConsumer : public index::IndexDataConsumer {
info.usr = HashUsr(USR);
if (auto *ND = dyn_cast<NamedDecl>(D)) {
info.short_name = ND->getNameAsString();
info.qualified = ND->getQualifiedNameAsString();
llvm::raw_string_ostream OS(info.qualified);
ND->printQualifiedName(OS, GetDefaultPolicy());
SimplifyAnonymous(info.qualified);
}
}
Expand Down
12 changes: 11 additions & 1 deletion src/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,17 @@ std::string LowerPathIfInsensitive(const std::string &path) {
c = tolower(c);
return ret;
#else
return path;
// use this opportunity to get full path
char *rpbuf = NULL;
std::string fullpath;
rpbuf = realpath(path.c_str(), NULL);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that since project is based on c++17 it worth to use std::filesystem

https://en.cppreference.com/w/cpp/filesystem/absolute

if (rpbuf != NULL) {
fullpath = rpbuf;
free(rpbuf);
} else {
fullpath = path;
}
return fullpath;
#endif
}

Expand Down