21 lines · cpp
1class classifier {};2// We should get all three completions when the cursor is at the beginning,3// middle, or end.4class cls5// ^class cls6// RUN: %clang_cc1 -code-completion-at=%s:%(line-2):1 %s | FileCheck --check-prefix=CHECK-CLS %s7// cl^ass cls8// RUN: %clang_cc1 -code-completion-at=%s:%(line-4):3 %s | FileCheck --check-prefix=CHECK-CLS %s9// class^ cls10// RUN: %clang_cc1 -code-completion-at=%s:%(line-6):6 %s | FileCheck --check-prefix=CHECK-CLS %s11 12// CHECK-CLS: COMPLETION: class{{$}}13// CHECK-CLS: COMPLETION: classifier : classifier14 15// class ^cls16// RUN: %clang_cc1 -code-completion-at=%s:%(line-12):7 %s | FileCheck --check-prefix=CHECK-NO-CLS %s17// class c^ls18// RUN: %clang_cc1 -code-completion-at=%s:%(line-14):8 %s | FileCheck --check-prefix=CHECK-NO-CLS %s19// CHECK-NO-CLS-NOT: COMPLETION: class{{$}}20// CHECK-NO-CLS: COMPLETION: classifier : classifier21