mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-30 11:27:07 +00:00
Fix VarDef::is_local; default cacheDirectory to ".ccls-cache"
This commit is contained in:
parent
f3490a3e6c
commit
ec2b893ee4
@ -45,8 +45,9 @@ struct Config {
|
|||||||
std::string compilationDatabaseCommand;
|
std::string compilationDatabaseCommand;
|
||||||
// Directory containing compile_commands.json.
|
// Directory containing compile_commands.json.
|
||||||
std::string compilationDatabaseDirectory;
|
std::string compilationDatabaseDirectory;
|
||||||
// Cache directory for indexed files.
|
// Cache directory for indexed files, either absolute or relative to the
|
||||||
std::string cacheDirectory;
|
// project root.
|
||||||
|
std::string cacheDirectory = ".ccls-cache";
|
||||||
// Cache serialization format.
|
// Cache serialization format.
|
||||||
//
|
//
|
||||||
// "json" generates `cacheDirectory/.../xxx.json` files which can be pretty
|
// "json" generates `cacheDirectory/.../xxx.json` files which can be pretty
|
||||||
|
@ -202,7 +202,7 @@ struct VarDef : NameMixin<VarDef> {
|
|||||||
uint8_t storage = clang::SC_None;
|
uint8_t storage = clang::SC_None;
|
||||||
|
|
||||||
bool is_local() const {
|
bool is_local() const {
|
||||||
return spell && spell->kind != SymbolKind::File &&
|
return spell && spell->kind == SymbolKind::Func &&
|
||||||
storage == clang::SC_None;
|
storage == clang::SC_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user