Treat function-scope static variables as locals

If we report such variables as symbols in response to a
`textDocument/documentSymbol`, then we can no longer navigate to the
containing function using imenu in emacs.

Fixes #77
This commit is contained in:
Anthony Cowley 2020-03-10 21:54:40 -04:00
parent 41e7d6a79c
commit 22952acd42

View File

@ -247,7 +247,7 @@ struct VarDef : NameMixin<VarDef> {
parent_kind == SymbolKind::StaticMethod ||
parent_kind == SymbolKind::Constructor) &&
(storage == clang::SC_None || storage == clang::SC_Auto ||
storage == clang::SC_Register);
storage == clang::SC_Register || storage == clang::SC_Static);
}
const Usr *bases_begin() const { return nullptr; }