47
47
// RUN: | FileCheck %s --check-prefix=FIND-STATIC-METHOD
48
48
49
49
// RUN: lldb-test symbols --find=function --name=Struct::overloaded_method --function-flags=full %t.exe \
50
- // RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD
50
+ // RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD-FULL
51
51
// RUN: lldb-test symbols --find=function --name=Struct::overloaded_method --function-flags=method %t.exe \
52
52
// RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD-METHOD
53
53
// RUN: lldb-test symbols --find=function --name=Struct::overloaded_method --function-flags=base %t.exe \
54
- // RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD
54
+ // RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD-BASE
55
55
56
56
struct Struct {
57
57
int simple_method () {
@@ -79,7 +79,28 @@ struct Struct {
79
79
}
80
80
};
81
81
82
+ class Class {
83
+ public:
84
+ bool overloaded_method () {
85
+ return false ;
86
+ }
87
+ bool overloaded_method (int i) {
88
+ return i > 0 ;
89
+ }
90
+ static int overloaded_method (bool b) {
91
+ return b ? 1 : 2 ;
92
+ }
93
+ };
94
+
95
+ char overloaded_method () {
96
+ return 0 ;
97
+ }
98
+ char overloaded_method (int i) {
99
+ return 0 ;
100
+ }
101
+
82
102
Struct s;
103
+ Class c;
83
104
84
105
static int static_fn () {
85
106
return 42 ;
@@ -91,7 +112,9 @@ int varargs_fn(int x, int y, ...) {
91
112
92
113
int main (int argc, char **argv) {
93
114
return static_fn () + varargs_fn (argc, argc) + s.simple_method () +
94
- Struct::static_method () + s.virtual_method () + s.overloaded_method ();
115
+ Struct::static_method () + s.virtual_method () + s.overloaded_method () +
116
+ Class::overloaded_method (false ) + c.overloaded_method (1 ) + c.overloaded_method ()
117
+ + overloaded_method () + overloaded_method (1 );
95
118
}
96
119
97
120
// FIND-MAIN: Function: id = {{.*}}, name = "main"
@@ -114,11 +137,29 @@ int main(int argc, char **argv) {
114
137
// FIND-STATIC-METHOD: Function: id = {{.*}}, name = "{{.*}}Struct::static_method{{.*}}"
115
138
// FIND-STATIC-METHOD-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
116
139
117
- // FIND-OVERLOAD: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
118
- // FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
119
- // FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
120
- // FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
121
-
122
- // FIND-OVERLOAD-METHOD: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
123
- // FIND-OVERLOAD-METHOD: FuncType: id = {{.*}}, compiler_type = "int (void)"
124
- // FIND-OVERLOAD-METHOD: FuncType: id = {{.*}}, compiler_type = "int (char)"
140
+ // FIND-OVERLOAD-FULL-NOT: "Class::overloaded_method"
141
+ // FIND-OVERLOAD-FULL-NOT: "overloaded_method"
142
+ // FIND-OVERLOAD-FULL: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
143
+ // FIND-OVERLOAD-FULL: FuncType: id = {{.*}}, compiler_type = "int (void)"
144
+ // FIND-OVERLOAD-FULL: FuncType: id = {{.*}}, compiler_type = "int (char)"
145
+ // FIND-OVERLOAD-FULL: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
146
+
147
+ // FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
148
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (void)"
149
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (char)"
150
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
151
+ // FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "Class::overloaded_method"
152
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (void)"
153
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (int)"
154
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (_Bool)"
155
+ // FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "overloaded_method"
156
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "char (void)"
157
+ // FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "char (int)"
158
+
159
+ // FIND-OVERLOAD-METHOD-NOT: "overloaded_method"
160
+ // FIND-OVERLOAD-METHOD-DAG: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
161
+ // FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "int (void)"
162
+ // FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "int (char)"
163
+ // FIND-OVERLOAD-METHOD-DAG: Function: id = {{.*}}, name = "Class::overloaded_method"
164
+ // FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (void)"
165
+ // FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (int)"
0 commit comments