annotate clang/test/Index/complete-with-annotations.cpp @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 class X {
anatofuz
parents:
diff changeset
2 void doSomething();
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 int field __attribute((annotate("one"), annotate("two"), annotate("three")));
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 public __attribute__((annotate("some annotation"))):
anatofuz
parents:
diff changeset
7 void func2();
anatofuz
parents:
diff changeset
8 int member2 __attribute__((annotate("another annotation")));
anatofuz
parents:
diff changeset
9 };
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 void X::doSomething() {
anatofuz
parents:
diff changeset
12 // RUN: c-index-test -code-completion-at=%s:13:9 %s | FileCheck %s
anatofuz
parents:
diff changeset
13 this->;
anatofuz
parents:
diff changeset
14 }
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 // CHECK: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34)
anatofuz
parents:
diff changeset
17 // CHECK: FieldDecl:{ResultType int}{TypedText field} (35) ("one", "two", "three")
anatofuz
parents:
diff changeset
18 // CHECK: CXXMethod:{ResultType void}{TypedText func2}{LeftParen (}{RightParen )} (34) ("some annotation")
anatofuz
parents:
diff changeset
19 // CHECK: FieldDecl:{ResultType int}{TypedText member2} (35) ("another annotation", "some annotation")
anatofuz
parents:
diff changeset
20 // CHECK: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (79)
anatofuz
parents:
diff changeset
21 // CHECK: ClassDecl:{TypedText X}{Text ::} (75)
anatofuz
parents:
diff changeset
22 // CHECK: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (79)
anatofuz
parents:
diff changeset
23