[SourceKit] Add annotation tags for decl names

This splits the printDeclNamEndLoc callback into NameEndLoc and
NameOrSignatureEndLoc variants to differentiate whether or not
signatures are included.  All existing clients move to
NameOrSignatureEndLoc to maintain the current behaviour. I'm still not
completely happy with how these are named, but I dont' have any better
ideas right now.

rdar://problem/24292226
This commit is contained in:
Ben Langmuir
2016-02-12 15:49:12 -08:00
parent 40ff0895d6
commit e327378b24
7 changed files with 47 additions and 30 deletions

View File

@@ -83,6 +83,13 @@ private:
closeTag(getTagForDecl(D, /*isRef=*/false));
}
void printDeclLoc(const Decl *D) override {
openTag("decl.name");
}
void printDeclNameEndLoc(const Decl *D) override {
closeTag("decl.name");
}
void printTypeRef(const TypeDecl *TD, Identifier name) override {
auto tag = getTagForDecl(TD, /*isRef=*/true);
OS << "<" << tag << " usr=\"";