mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Add annotation tags for generic type requirements
Each requirement gets tagged. We could also tag the whole where clause if we need to, but so far it hasn't been interesting. rdar://problem/24292226
This commit is contained in:
@@ -76,6 +76,8 @@ static StringRef getTagForParameter(PrintParameterKind context) {
|
||||
return "decl.var.parameter";
|
||||
case PrintParameterKind::GenericParameter:
|
||||
return "decl.generic_type_param";
|
||||
case PrintParameterKind::GenericRequirement:
|
||||
return "decl.generic_type_requirement";
|
||||
}
|
||||
llvm_unreachable("unexpected parameter kind");
|
||||
}
|
||||
@@ -255,6 +257,8 @@ private:
|
||||
return parameterTypeTag;
|
||||
if (context.is(PrintParameterKind::GenericParameter))
|
||||
return genericParamTypeTag;
|
||||
if (context.is(PrintParameterKind::GenericRequirement))
|
||||
return "";
|
||||
|
||||
assert(context.getDecl() && "unexpected context kind");
|
||||
switch (context.getDecl()->getKind()) {
|
||||
|
||||
Reference in New Issue
Block a user