• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // clang-format off
2 // REQUIRES: lld, x86
3 
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
8 
9 struct Struct {
simple_methodStruct10   void simple_method() {}
11 
virtual_methodStruct12   virtual void virtual_method() {}
13 
static_methodStruct14   static void static_method() {}
15 
overloaded_methodStruct16   int overloaded_method() {}
overloaded_methodStruct17   int overloaded_method(char c) {}
overloaded_methodStruct18   int overloaded_method(char c, int i, ...) {}
19 };
20 
21 Struct s;
22 
main(int argc,char ** argv)23 int main(int argc, char **argv) {
24   return 0;
25 }
26 
27 // CHECK: TranslationUnitDecl
28 // CHECK: |-CXXRecordDecl {{.*}} struct Struct definition
29 // CHECK: | |-CXXMethodDecl {{.*}} simple_method 'void (){{.*}}'
30 // CHECK: | |-CXXMethodDecl {{.*}} virtual_method 'void (){{.*}}' virtual
31 // CHECK: | |-CXXMethodDecl {{.*}} static_method 'void ()' static
32 // CHECK: | |-CXXMethodDecl {{.*}} overloaded_method 'int (){{.*}}'
33 // CHECK: | |-CXXMethodDecl {{.*}} overloaded_method 'int (char){{.*}}'
34 // CHECK: | | `-ParmVarDecl {{.*}} 'char'
35 // CHECK: | `-CXXMethodDecl {{.*}} overloaded_method 'int (char, int, ...)'
36 // CHECK: |   |-ParmVarDecl {{.*}} 'char'
37 // CHECK: |   `-ParmVarDecl {{.*}} 'int'
38