Browse Source

Fix VarDef::is_local; default cacheDirectory to ".ccls-cache"

pull/517/head
Fangrui Song 6 years ago
parent
commit
d7c48d12d6
  1. 5
      src/config.h
  2. 2
      src/indexer.h

5
src/config.h

@ -33,8 +33,9 @@ struct Config {
std::string compilationDatabaseCommand;
// Directory containing compile_commands.json.
std::string compilationDatabaseDirectory;
// Cache directory for indexed files.
std::string cacheDirectory;
// Cache directory for indexed files, either absolute or relative to the
// project root.
std::string cacheDirectory = ".ccls-cache";
// Cache serialization format.
//
// "json" generates `cacheDirectory/.../xxx.json` files which can be pretty

2
src/indexer.h

@ -190,7 +190,7 @@ struct VarDef : NameMixin<VarDef> {
uint8_t storage = clang::SC_None;
bool is_local() const {
return spell && spell->kind != SymbolKind::File &&
return spell && spell->kind == SymbolKind::Func &&
storage == clang::SC_None;
}

Loading…
Cancel
Save