adjust autoclosure/noescape printing to print them in their type

position instead of before a parameter.  This wraps up the meat of
SE-0049.
This commit is contained in:
Chris Lattner
2016-04-15 17:03:22 -07:00
parent a0fa099f1a
commit a0c5d2a7df
6 changed files with 22 additions and 65 deletions

View File

@@ -36,9 +36,9 @@ func foo3(a: Float, b: Bool) {}
// CHECK-REPLACEMENT1: <Group>Collection/Array</Group>
// CHECK-REPLACEMENT1: <Declaration>func sorted() -&gt; [<Type usr="s:Si">Int</Type>]</Declaration>
// CHECK-REPLACEMENT1: RELATED BEGIN
// CHECK-REPLACEMENT1: sorted(@noescape isOrderedBefore: @noescape (Int, Int) -&gt; Bool) -&gt; [Int]</RelatedName>
// CHECK-REPLACEMENT1: sorted(isOrderedBefore: @noescape (Int, Int) -&gt; Bool) -&gt; [Int]</RelatedName>
// CHECK-REPLACEMENT1: sorted() -&gt; [Int]</RelatedName>
// CHECK-REPLACEMENT1: sorted(@noescape isOrderedBefore: @noescape (Int, Int) -&gt; Bool) -&gt; [Int]</RelatedName>
// CHECK-REPLACEMENT1: sorted(isOrderedBefore: @noescape (Int, Int) -&gt; Bool) -&gt; [Int]</RelatedName>
// CHECK-REPLACEMENT1: RELATED END
// RUN: %sourcekitd-test -req=cursor -pos=9:8 %s -- %s %mcp_opt %clang-importer-sdk | FileCheck -check-prefix=CHECK-REPLACEMENT2 %s
@@ -47,10 +47,10 @@ func foo3(a: Float, b: Bool) {}
// RUN: %sourcekitd-test -req=cursor -pos=15:10 %s -- %s %mcp_opt %clang-importer-sdk | FileCheck -check-prefix=CHECK-REPLACEMENT3 %s
// CHECK-REPLACEMENT3: <Group>Collection/Array</Group>
// CHECK-REPLACEMENT3: func sorted(@noescape isOrderedBefore: @noescape (<Type usr="s:V13cursor_stdlib2S1">S1</Type>
// CHECK-REPLACEMENT3: func sorted(isOrderedBefore: @noescape (<Type usr="s:V13cursor_stdlib2S1">S1</Type>
// CHECK-REPLACEMENT3: sorted() -&gt; [S1]</RelatedName>
// CHECK-REPLACEMENT3: sorted() -&gt; [S1]</RelatedName>
// CHECK-REPLACEMENT3: sorted(@noescape isOrderedBefore: @noescape (S1, S1) -&gt; Bool) -&gt; [S1]</RelatedName>
// CHECK-REPLACEMENT3: sorted(isOrderedBefore: @noescape (S1, S1) -&gt; Bool) -&gt; [S1]</RelatedName>
// RUN: %sourcekitd-test -req=cursor -pos=18:8 %s -- %s %mcp_opt %clang-importer-sdk | FileCheck -check-prefix=CHECK-REPLACEMENT4 %s
// CHECK-REPLACEMENT4: <Group>Collection/Array</Group>