[llvm-branch-commits] [cfe-branch] r111244 - in /cfe/branches/Apple/whitney-IB/src/tools/clang: ./ lib/Sema/SemaCodeComplete.cpp test/Index/complete-method-decls.m

Daniel Dunbar daniel at zuster.org
Tue Aug 17 09:26:39 PDT 2010


Author: ddunbar
Date: Tue Aug 17 11:26:39 2010
New Revision: 111244

URL: http://llvm.org/viewvc/llvm-project?rev=111244&view=rev
Log:
--- Merging r111233 into 'src/tools/clang':
U    src/tools/clang/test/Index/complete-method-decls.m
U    src/tools/clang/lib/Sema/SemaCodeComplete.cpp


Modified:
    cfe/branches/Apple/whitney-IB/src/tools/clang/   (props changed)
    cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaCodeComplete.cpp
    cfe/branches/Apple/whitney-IB/src/tools/clang/test/Index/complete-method-decls.m

Propchange: cfe/branches/Apple/whitney-IB/src/tools/clang/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 17 11:26:39 2010
@@ -1 +1 @@
-/cfe/trunk:110882,110901,110906,110933,110950,110979,111023
+/cfe/trunk:110882,110901,110906,110933,110950,110979,111023,111233

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaCodeComplete.cpp?rev=111244&r1=111243&r2=111244&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/lib/Sema/SemaCodeComplete.cpp Tue Aug 17 11:26:39 2010
@@ -4118,7 +4118,7 @@
         Pattern->AddChunk(CodeCompletionString::CK_Colon);
       else if (I < Sel.getNumArgs()) {
         Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
-        Pattern->AddTextChunk(Sel.getIdentifierInfoForSlot(1)->getName());
+        Pattern->AddTextChunk(Sel.getIdentifierInfoForSlot(I)->getName());
         Pattern->AddChunk(CodeCompletionString::CK_Colon);
       } else
         break;

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/test/Index/complete-method-decls.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/test/Index/complete-method-decls.m?rev=111244&r1=111243&r2=111244&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/test/Index/complete-method-decls.m (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/test/Index/complete-method-decls.m Tue Aug 17 11:26:39 2010
@@ -52,6 +52,10 @@
 - (int)first:(int)x second2:(float)y third:(double)z;
 @end
 
+ at implementation D
+- (int)first:(int)x second2:(float)y third:(double)z;
+ at end
+
 // RUN: c-index-test -code-completion-at=%s:17:3 %s | FileCheck -check-prefix=CHECK-CC1 %s
 // CHECK-CC1: NotImplemented:{LeftParen (}{Text id}{RightParen )}{TypedText abc}
 // CHECK-CC1: NotImplemented:{LeftParen (}{Text int}{RightParen )}{TypedText getInt}
@@ -99,5 +103,16 @@
 // CHECK-CC9: NotImplemented:{TypedText xxx} (30)
 // RUN: c-index-test -code-completion-at=%s:52:36 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CCA %s
 // CHECK-CCA: NotImplemented:{TypedText y2} (30)
-
-
+// RUN: c-index-test -code-completion-at=%s:56:3 %s | FileCheck -check-prefix=CHECK-CCB %s
+// CHECK-CCB: NotImplemented:{LeftParen (}{Text int}{RightParen )}{TypedText first}{Colon :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace  }{Text second2}{Colon :}{LeftParen (}{Text float}{RightParen )}{Text y}{HorizontalSpace  }{Text third}{Colon :}{LeftParen (}{Text double}{RightParen )}{Text z} (30)
+// RUN: c-index-test -code-completion-at=%s:56:8 %s | FileCheck -check-prefix=CHECK-CCC %s
+// CHECK-CCC: NotImplemented:{TypedText first}{Colon :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace  }{Text second2}{Colon :}{LeftParen (}{Text float}{RightParen )}{Text y}{HorizontalSpace  }{Text third}{Colon :}{LeftParen (}{Text double}{RightParen )}{Text z} (30)
+// RUN: c-index-test -code-completion-at=%s:56:21 %s | FileCheck -check-prefix=CHECK-CCD %s
+// FIXME: These results could be more precise.
+// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType id}{Informative first:}{TypedText second2:}{Text (float)y2}{HorizontalSpace  }{Text third:}{Text (double)z} (20)
+// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{TypedText second2:}{Text (float)y}{HorizontalSpace  }{Text third:}{Text (double)z} (5)
+// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType void *}{Informative first:}{TypedText second3:}{Text (float)y3}{HorizontalSpace  }{Text third:}{Text (double)z} (20)
+// CHECK-CCD: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{TypedText second:}{Text (float)y}{HorizontalSpace  }{Text third:}{Text (double)z} (5)
+// RUN: c-index-test -code-completion-at=%s:56:38 %s | FileCheck -check-prefix=CHECK-CCE %s
+// CHECK-CCE: ObjCInstanceMethodDecl:{ResultType id}{Informative first:}{Informative second2:}{TypedText third:}{Text (double)z} (20)
+// CHECK-CCE: ObjCInstanceMethodDecl:{ResultType int}{Informative first:}{Informative second2:}{TypedText third:}{Text (double)z} (5)





More information about the llvm-branch-commits mailing list