[Lldb-commits] [lldb] r370194 - [lldb][NFC] Extend operator test case with conversion operators
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 28 05:14:39 PDT 2019
Author: teemperor
Date: Wed Aug 28 05:14:39 2019
New Revision: 370194
URL: http://llvm.org/viewvc/llvm-project?rev=370194&view=rev
Log:
[lldb][NFC] Extend operator test case with conversion operators
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp
Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp?rev=370194&r1=370193&r2=370194&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp Wed Aug 28 05:14:39 2019
@@ -45,6 +45,9 @@ struct C {
int operator[](int) { return 91; }
int operator()(int) { return 92; }
+
+ operator int() { return 11; }
+ operator long() { return 12; }
};
int main(int argc, char **argv) {
@@ -93,6 +96,10 @@ int main(int argc, char **argv) {
result += c(1);
result += c[1];
+
+ result += static_cast<int>(c);
+ result += static_cast<long>(c);
+
//% self.expect("expr c->dummy", endstr=" 2324\n")
//% self.expect("expr c->*2", endstr=" 2\n")
//% self.expect("expr c + 44", endstr=" 44\n")
@@ -138,5 +145,7 @@ int main(int argc, char **argv) {
//% self.expect("expr c(1)", endstr=" 91\n")
//% self.expect("expr c[1]", endstr=" 92\n")
+ //% self.expect("expr static_cast<int>", endstr=" 11\n")
+ //% self.expect("expr static_cast<long>", endstr=" 12\n")
return 0;
}
More information about the lldb-commits
mailing list