[SourceKit] Add decl.var.parameters entries to the fully annotated decl

This is the first part of adding parameter substructure so that clients
can reason about more of the function declaration.

rdar://problem/24292226
This commit is contained in:
Ben Langmuir
2016-02-24 11:39:47 -08:00
parent 184efb5e1c
commit 3e9bfa137d
6 changed files with 76 additions and 55 deletions

View File

@@ -92,6 +92,8 @@ public:
}
void printDeclPre(const Decl *D) override {
if (isa<ParamDecl>(D))
return; // Parameters are handled specially in addParameters().
unsigned StartOffset = OS.tell();
EntitiesStack.emplace_back(D, StartOffset);
}
@@ -104,6 +106,9 @@ public:
}
void printDeclPost(const Decl *D) override {
if (isa<ParamDecl>(D))
return; // Parameters are handled specially in addParameters().
assert(EntitiesStack.back().Dcl == D);
TextEntity Entity = std::move(EntitiesStack.back());
EntitiesStack.pop_back();