On Tue, Dec 22, 2009 at 4:21 PM, Douglas Gregor <[email protected]> wrote: > Author: dgregor > Date: Tue Dec 22 18:21:46 2009 > New Revision: 91951 > > URL: http://llvm.org/viewvc/llvm-project?rev=91951&view=rev > Log: > Objective-C methods can be variadic, too. Who knew.
objc-language-features.inc, although just barely. - Daniel > Modified: > cfe/trunk/lib/Sema/SemaCodeComplete.cpp > cfe/trunk/test/Index/complete-objc-message.m > > Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=91951&r1=91950&r2=91951&view=diff > > ============================================================================== > --- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original) > +++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Tue Dec 22 18:21:46 2009 > @@ -1205,6 +1205,13 @@ > Result->AddPlaceholderChunk(Arg); > } > > + if (Method->isVariadic()) { > + if (AllParametersAreInformative) > + Result->AddInformativeChunk(", ..."); > + else > + Result->AddPlaceholderChunk(", ..."); > + } > + > return Result; > } > > > Modified: cfe/trunk/test/Index/complete-objc-message.m > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-objc-message.m?rev=91951&r1=91950&r2=91951&view=diff > > ============================================================================== > --- cfe/trunk/test/Index/complete-objc-message.m (original) > +++ cfe/trunk/test/Index/complete-objc-message.m Tue Dec 22 18:21:46 2009 > @@ -95,6 +95,14 @@ > [ovl Method:1 Arg1:1 OtherArg:ovl]; > } > > +...@interface Ellipsis > +- (int)Method:(int)i, ...; > +...@end > + > +void f(Ellipsis *e) { > + [e Method:1, 2, 3]; > +} > + > // RUN: c-index-test -code-completion-at=%s:23:19 %s | FileCheck > -check-prefix=CHECK-CC1 %s > // CHECK-CC1: {TypedText categoryClassMethod} > // CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)a}{Text > withKeyword:}{Placeholder (int)b} > @@ -143,3 +151,5 @@ > // CHECK-CCA: ObjCInterfaceDecl:{TypedText MySubClass} > // CHECK-CCA: TypedefDecl:{TypedText SEL} > // CHECK-CCA: {TypedText super} > +// RUN: c-index-test -code-completion-at=%s:103:6 %s | FileCheck > -check-prefix=CHECK-CCB %s > +// CHECK-CCB: ObjCInstanceMethodDecl:{ResultType int}{TypedText > Method:}{Placeholder (int)i}{Placeholder , ...} > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
