Fix is_local for vars with non-auto storage period

This commit is contained in:
Riatre Foo 2018-10-15 23:25:46 +08:00 committed by Fangrui Song
parent cd0f204349
commit 2db67f6edb

View File

@ -244,7 +244,8 @@ struct VarDef : NameMixin<VarDef> {
parent_kind == SymbolKind::Method ||
parent_kind == SymbolKind::StaticMethod ||
parent_kind == SymbolKind::Constructor) &&
storage == clang::SC_None;
(storage == clang::SC_None || storage == clang::SC_Auto ||
storage == clang::SC_Register);
}
std::vector<Usr> GetBases() const { return {}; }