From 22952acd425c57de743331939f3317258978231b Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Tue, 10 Mar 2020 21:54:40 -0400 Subject: [PATCH] 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 --- src/indexer.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/indexer.hh b/src/indexer.hh index cd4669a9..a06a743b 100644 --- a/src/indexer.hh +++ b/src/indexer.hh @@ -247,7 +247,7 @@ struct VarDef : NameMixin { 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; }