[flang] Fix length handling in character kind implicit conversion (#74586)
[llvm-project.git] / lldb / test / Shell / SymbolFile / NativePDB / ast-methods.cpp
blobf2be33aae8163bf0f54f0b6545243df29e2d914c
1 // clang-format off
2 // REQUIRES: lld, x86
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
11 struct Struct {
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, ...) {}
23 Struct s;
25 int main(int argc, char **argv) {
26 s.simple_method();
27 s.static_method();
28 s.virtual_method();
29 s.overloaded_method();
30 s.overloaded_method('a');
31 s.overloaded_method('a', 1);
32 return 0;
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, ...);
55 // SYMBOL-NEXT: };