Douglas Gregor | 719770d | 2010-04-06 17:30:22 +0000 | [diff] [blame] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
| 3 | |
| 4 | @interface C |
| 5 | - (int)instanceMethod3:(int)x; |
| 6 | + (int)classMethod3:(float)f; |
| 7 | @end |
| 8 | |
| 9 | void msg_id(id x) { |
| 10 | [id classMethod1:1.0]; |
| 11 | [x instanceMethod1:5]; |
| 12 | } |
| 13 | |
| 14 | // Build the precompiled header |
| 15 | // RUN: %clang -x objective-c-header -o %t.h.pch %S/Inputs/complete-pch.h |
| 16 | |
| 17 | // Run the actual tests |
| 18 | // RUN: c-index-test -code-completion-at=%s:10:7 -include %t.h %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | aba4808 | 2010-08-29 19:47:46 +0000 | [diff] [blame] | 19 | // CHECK-CC1: ObjCClassMethodDecl:{ResultType int}{TypedText classMethod1:}{Placeholder (double)} |
| 20 | // CHECK-CC1: ObjCClassMethodDecl:{ResultType int}{TypedText classMethod2:}{Placeholder (float)} |
| 21 | // CHECK-CC1: ObjCClassMethodDecl:{ResultType int}{TypedText classMethod3:}{Placeholder (float)} |
Douglas Gregor | 719770d | 2010-04-06 17:30:22 +0000 | [diff] [blame] | 22 | |
| 23 | // RUN: c-index-test -code-completion-at=%s:11:6 -include %t.h %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | aba4808 | 2010-08-29 19:47:46 +0000 | [diff] [blame] | 24 | // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText instanceMethod1:}{Placeholder (int)} |
| 25 | // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText instanceMethod2:}{Placeholder (int)} |
| 26 | // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText instanceMethod3:}{Placeholder (int)} |