[SourceKit] Add local variables to structure (SR-5057) (#11431)

This commit is contained in:
Marcelo Fabri
2017-08-11 22:43:05 +02:00
committed by Xi Ge
parent 273dd8740e
commit 40b054b642
8 changed files with 100 additions and 43 deletions

View File

@@ -1039,7 +1039,8 @@ public:
UIdent Kind = SwiftLangSupport::getUIDForSyntaxStructureKind(Node.Kind);
UIdent AccessLevel;
UIdent SetterAccessLevel;
if (Node.Kind != SyntaxStructureKind::Parameter) {
if (Node.Kind != SyntaxStructureKind::Parameter &&
Node.Kind != SyntaxStructureKind::LocalVariable) {
if (auto *VD = dyn_cast_or_null<ValueDecl>(Node.Dcl)) {
AccessLevel = getAccessibilityUID(inferAccessibility(VD));
} else if (auto *ED = dyn_cast_or_null<ExtensionDecl>(Node.Dcl)) {