4 // RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -GR- -c /Fo%t.obj -- %s
5 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
6 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
7 // RUN: %p/Inputs/ast-methods.lldbinit 2>&1 | FileCheck %s --check-prefix=AST
9 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols --dump-ast %t.exe | FileCheck %s --check-prefix=SYMBOL
12 void simple_method() {}
14 virtual void virtual_method() {}
16 static void static_method() {}
18 int overloaded_method() {}
19 int overloaded_method(char c
) {}
20 int overloaded_method(char c
, int i
, ...) {}
25 int main(int argc
, char **argv
) {
29 s
.overloaded_method();
30 s
.overloaded_method('a');
31 s
.overloaded_method('a', 1);
35 // AST: TranslationUnitDecl
36 // AST: |-CXXRecordDecl {{.*}} struct Struct definition
37 // AST: | |-CXXMethodDecl {{.*}} simple_method 'void (){{.*}}'
38 // AST: | |-CXXMethodDecl {{.*}} virtual_method 'void (){{.*}}' virtual
39 // AST: | |-CXXMethodDecl {{.*}} static_method 'void ()' static
40 // AST: | |-CXXMethodDecl {{.*}} overloaded_method 'int (){{.*}}'
41 // AST: | |-CXXMethodDecl {{.*}} overloaded_method 'int (char){{.*}}'
42 // AST: | | `-ParmVarDecl {{.*}} 'char'
43 // AST: | `-CXXMethodDecl {{.*}} overloaded_method 'int (char, int, ...)'
44 // AST: | |-ParmVarDecl {{.*}} 'char'
45 // AST: | `-ParmVarDecl {{.*}} 'int'
47 // SYMBOL: int main(int argc, char **argv);
48 // SYMBOL-NEXT: struct Struct {
49 // SYMBOL-NEXT: void simple_method();
50 // SYMBOL-NEXT: static void static_method();
51 // SYMBOL-NEXT: virtual void virtual_method();
52 // SYMBOL-NEXT: int overloaded_method();
53 // SYMBOL-NEXT: int overloaded_method(char);
54 // SYMBOL-NEXT: int overloaded_method(char, int, ...);