[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / overrides.cpp
blobe311699f866042f1b15520642ce3810088553aca
1 struct A {
2 virtual void f(int);
3 };
5 struct B {
6 virtual void f(int);
7 virtual void g();
8 };
10 struct C : B, A {
11 virtual void g();
14 struct D : C {
15 virtual void f(int);
18 void C::g() {}
20 struct E {
21 virtual void h() = 0;
22 template <typename T> void i(T);
25 // RUN: c-index-test -test-load-source local %s | FileCheck %s
26 // CHECK: overrides.cpp:11:16: CXXMethod=g:11:16 (virtual) [Overrides @7:16] Extent=[11:3 - 11:19]
27 // CHECK: overrides.cpp:15:16: CXXMethod=f:15:16 (virtual) [Overrides @2:16, @6:16] Extent=[15:3 - 15:22]
28 // CHECK: overrides.cpp:18:9: CXXMethod=g:18:9 (Definition) (virtual) [Overrides @7:16] Extent=[18:1 - 18:15]
29 // CHECK: overrides.cpp:21:16: CXXMethod=h:21:16 (virtual) (pure) Extent=[21:3 - 21:23]
30 // CHECK: overrides.cpp:22:30: FunctionTemplate=i:22:30 Extent=[22:3 - 22:34]