complete-with-annotations.cpp 992 B

1234567891011121314151617181920212223
  1. class X {
  2. void doSomething();
  3. int field __attribute((annotate("one"), annotate("two"), annotate("three")));
  4. public __attribute__((annotate("some annotation"))):
  5. void func2();
  6. int member2 __attribute__((annotate("another annotation")));
  7. };
  8. void X::doSomething() {
  9. // RUN: c-index-test -code-completion-at=%s:13:9 %s | FileCheck %s
  10. this->;
  11. }
  12. // CHECK: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34)
  13. // CHECK: FieldDecl:{ResultType int}{TypedText field} (35) ("three", "two", "one")
  14. // CHECK: CXXMethod:{ResultType void}{TypedText func2}{LeftParen (}{RightParen )} (34) ("some annotation")
  15. // CHECK: FieldDecl:{ResultType int}{TypedText member2} (35) ("another annotation", "some annotation")
  16. // CHECK: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (34)
  17. // CHECK: ClassDecl:{TypedText X}{Text ::} (75)
  18. // CHECK: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (34)