xref: /minix3/external/bsd/llvm/dist/clang/test/Index/complete-with-annotations.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc class X {
2*f4a2713aSLionel Sambuc   void doSomething();
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc   int field __attribute((annotate("one"), annotate("two"), annotate("three")));
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc public __attribute__((annotate("some annotation"))):
7*f4a2713aSLionel Sambuc   void func2();
8*f4a2713aSLionel Sambuc   int member2 __attribute__((annotate("another annotation")));
9*f4a2713aSLionel Sambuc };
10*f4a2713aSLionel Sambuc 
doSomething()11*f4a2713aSLionel Sambuc void X::doSomething() {
12*f4a2713aSLionel Sambuc   // RUN: c-index-test -code-completion-at=%s:13:9 %s | FileCheck %s
13*f4a2713aSLionel Sambuc   this->;
14*f4a2713aSLionel Sambuc }
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc // CHECK: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34)
17*f4a2713aSLionel Sambuc // CHECK: FieldDecl:{ResultType int}{TypedText field} (35) ("three", "two", "one")
18*f4a2713aSLionel Sambuc // CHECK: CXXMethod:{ResultType void}{TypedText func2}{LeftParen (}{RightParen )} (34) ("some annotation")
19*f4a2713aSLionel Sambuc // CHECK: FieldDecl:{ResultType int}{TypedText member2} (35) ("another annotation", "some annotation")
20*f4a2713aSLionel Sambuc // CHECK: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (34)
21*f4a2713aSLionel Sambuc // CHECK: ClassDecl:{TypedText X}{Text ::} (75)
22*f4a2713aSLionel Sambuc // CHECK: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (34)
23*f4a2713aSLionel Sambuc 
24