Sourcekit/DocSupport: fix an assertion when generating documentation for extensions with attributes

When sanitizing the documentation comments for synthesized extensions,
we expect some text like "<declaration>extension". This isn't the case
when use-facing attributes are present.

rdar://50913510
This commit is contained in:
Xi Ge
2019-05-20 17:33:53 -07:00
parent 3b4bb1960d
commit 1ca8e83aa3
5 changed files with 1359 additions and 1207 deletions

View File

@@ -1,4 +1,4 @@
// RUN: %empty-directory(%t.mod)
// RUN: %swift -emit-module -o %t.mod/cake.swiftmodule %S/Inputs/cake.swift -parse-as-library -enable-objc-interop
// RUN: %swift -emit-module -o %t.mod/cake.swiftmodule %S/Inputs/cake.swift -parse-as-library -enable-objc-interop -emit-module-doc-path %t.mod/cake.swiftdoc
// RUN: %sourcekitd-test -req=doc-info -module cake -- -I %t.mod > %t.response
// RUN: diff -u %s.response %t.response