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 | 0c010cddb32775721fcc5dce9ae815d0510578e0 (patch) | |
tree | 37cfd0a7bc4ab52627223e74446baf8b05553444 /clang/test/Index/code-completion.cpp | |
parent | 951995821a97969f662ac737e5a54689680b075f (diff) | |
download | bcm5719-llvm-0c010cddb32775721fcc5dce9ae815d0510578e0.tar.gz bcm5719-llvm-0c010cddb32775721fcc5dce9ae815d0510578e0.zip |
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
llvm-svn: 227309
Diffstat (limited to 'clang/test/Index/code-completion.cpp')
-rw-r--r-- | clang/test/Index/code-completion.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Index/code-completion.cpp b/clang/test/Index/code-completion.cpp index fe5240276ce..83aa9437443 100644 --- a/clang/test/Index/code-completion.cpp +++ b/clang/test/Index/code-completion.cpp @@ -58,9 +58,9 @@ Z::operator int() const { // CHECK-MEMBER-NEXT: Container is complete // CHECK-MEMBER-NEXT: Container USR: c:@S@Z -// CHECK-OVERLOAD: OverloadCandidate:{ResultType int &}{Text overloaded}{LeftParen (}{Text Z z}{Comma , }{CurrentParameter int second}{RightParen )} -// CHECK-OVERLOAD: OverloadCandidate:{ResultType float &}{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )} -// CHECK-OVERLOAD: OverloadCandidate:{ResultType double &}{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )} +// CHECK-OVERLOAD: OverloadCandidate:{ResultType int &}{Text overloaded}{LeftParen (}{Placeholder Z z}{Comma , }{CurrentParameter int second}{RightParen )} +// CHECK-OVERLOAD: OverloadCandidate:{ResultType float &}{Text overloaded}{LeftParen (}{Placeholder int i}{Comma , }{CurrentParameter long second}{RightParen )} +// CHECK-OVERLOAD: OverloadCandidate:{ResultType double &}{Text overloaded}{LeftParen (}{Placeholder float f}{Comma , }{CurrentParameter int second}{RightParen )} // CHECK-OVERLOAD: Completion contexts: // CHECK-OVERLOAD-NEXT: Any type // CHECK-OVERLOAD-NEXT: Any value |