diff options
author | Francisco Lopes da Silva <oblita@gmail.com> | 2015-01-28 14:17:22 +0000 |
---|---|---|
committer | Francisco Lopes da Silva <oblita@gmail.com> | 2015-01-28 14:17:22 +0000 |
commit | 90ffec0e7ebba3cd7f2cd582b39e62ff40ceacb5 (patch) | |
tree | 64f4e3d48457d104ea1dc459901d9d864502a000 /test/Index/complete-functor-call.cpp | |
parent | 18a541723125a193231dbb1b9fb2250c0577bf8d (diff) |
Improves overload completion result chunks.
The code building the code completion string for overloads was providing
less detail compared to the one building completion strings for function
declarations. There was no information about optionals and no information
about what's a parameter and what's a function identifier, everything
besides ResultType, CurrentParameter and special characters was classified
as Text.
This makes code completion strings for overload candidates to follow a
pattern very similar, but not identical, to the one in use for function
declarations:
- return type chunk: ResultType
- function identifier chunk: Text
- parameter chunks: Placeholder
- optional parameter chunks: Optional
- current parameter chunk: CurrentParameter
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/complete-functor-call.cpp')
-rw-r--r-- | test/Index/complete-functor-call.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/Index/complete-functor-call.cpp b/test/Index/complete-functor-call.cpp index 6fac36dd8c..b6aed7eb19 100644 --- a/test/Index/complete-functor-call.cpp +++ b/test/Index/complete-functor-call.cpp @@ -26,7 +26,7 @@ int main() { // RUN: c-index-test -code-completion-at=%s:16:5 %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC1: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Placeholder T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC1: Completion contexts: // CHECK-CC1-NEXT: Any type // CHECK-CC1-NEXT: Any value @@ -40,7 +40,7 @@ int main() { // RUN: c-index-test -code-completion-at=%s:17:5 %s | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC2: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Placeholder T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC2: Completion contexts: // CHECK-CC2-NEXT: Any type // CHECK-CC2-NEXT: Any value @@ -54,7 +54,7 @@ int main() { // RUN: c-index-test -code-completion-at=%s:18:5 %s | FileCheck -check-prefix=CHECK-CC3 %s // CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC3: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Placeholder T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC3: Completion contexts: // CHECK-CC3-NEXT: Any type // CHECK-CC3-NEXT: Any value @@ -66,7 +66,7 @@ int main() { // CHECK-CC3-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:18:7 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC4: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Placeholder void *}{Comma , }{CurrentParameter T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC4: Completion contexts: // CHECK-CC4-NEXT: Any type // CHECK-CC4-NEXT: Any value @@ -78,7 +78,7 @@ int main() { // CHECK-CC4-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:18:10 %s | FileCheck -check-prefix=CHECK-CC5 %s -// CHECK-CC5: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text void *}{Comma , }{Text S<void *>}{Comma , }{CurrentParameter S<void *>}{RightParen )} (1) +// CHECK-CC5: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Placeholder void *}{Comma , }{Placeholder S<void *>}{Comma , }{CurrentParameter S<void *>}{RightParen )} (1) // CHECK-CC5: Completion contexts: // CHECK-CC5-NEXT: Any type // CHECK-CC5-NEXT: Any value @@ -92,7 +92,7 @@ int main() { // RUN: c-index-test -code-completion-at=%s:19:17 %s | FileCheck -check-prefix=CHECK-CC6 %s // CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC6: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Placeholder T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC6: OverloadCandidate:{ResultType const S<T> *}{Text operator()}{LeftParen (}{CurrentParameter const S<T> &s}{RightParen )} (1) // CHECK-CC6: Completion contexts: // CHECK-CC6-NEXT: Any type @@ -107,7 +107,7 @@ int main() { // RUN: c-index-test -code-completion-at=%s:19:28 %s | FileCheck -check-prefix=CHECK-CC7 %s // CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC7: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{Comma , }{Placeholder T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC7: OverloadCandidate:{ResultType const S<T> *}{Text operator()}{LeftParen (}{CurrentParameter const S<T> &s}{RightParen )} (1) // CHECK-CC7: Completion contexts: // CHECK-CC7-NEXT: Any type @@ -120,7 +120,7 @@ int main() { // CHECK-CC7-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:19:31 %s | FileCheck -check-prefix=CHECK-CC8 %s -// CHECK-CC8: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{Comma , }{CurrentParameter T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC8: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Placeholder int}{Comma , }{CurrentParameter T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC8: Completion contexts: // CHECK-CC8-NEXT: Any type // CHECK-CC8-NEXT: Any value @@ -132,7 +132,7 @@ int main() { // CHECK-CC8-NEXT: Objective-C interface // RUN: c-index-test -code-completion-at=%s:19:35 %s | FileCheck -check-prefix=CHECK-CC9 %s -// CHECK-CC9: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Text int}{Comma , }{Text int}{Comma , }{CurrentParameter int}{RightParen )} (1) +// CHECK-CC9: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{Placeholder int}{Comma , }{Placeholder int}{Comma , }{CurrentParameter int}{RightParen )} (1) // CHECK-CC9: Completion contexts: // CHECK-CC9-NEXT: Any type // CHECK-CC9-NEXT: Any value @@ -179,7 +179,7 @@ int main() { // RUN: c-index-test -code-completion-at=%s:12:28 %s | FileCheck -check-prefix=CHECK-CC13 %s // CHECK-CC13: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter int}{RightParen )} (1) // CHECK-CC13: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter T}{RightParen )} (1) -// CHECK-CC13: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Text T}{Comma , }{Text T}{RightParen )} (1) +// CHECK-CC13: OverloadCandidate:{ResultType void}{Text operator()}{LeftParen (}{CurrentParameter void *}{Comma , }{Placeholder T}{Comma , }{Placeholder T}{RightParen )} (1) // CHECK-CC13: Completion contexts: // CHECK-CC13-NEXT: Any type // CHECK-CC13-NEXT: Any value |