diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
4 files changed, 43 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c b/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c index 29ac10cb94a..02fefd36cee 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c +++ b/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c @@ -29,6 +29,10 @@ int main (int argc, char const *argv[]) //% self.expect("expression -- (pt.padding[0])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["(char)", " = "]) //% self.expect("image lookup -t point_tag", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['padding[]']) # Once rdar://problem/12566646 is fixed, this should display correctly + struct {} empty; + //% self.expect("frame variable empty", substrs = ["empty = {}"]) + //% self.expect("expression -- sizeof(empty)", substrs = ["= 0"]) + struct rect_tag { struct point_tag bottom_left; struct point_tag top_right; diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/Makefile new file mode 100644 index 00000000000..99bfa7e03b4 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/Makefile @@ -0,0 +1,3 @@ +LEVEL = ../../../make +CXX_SOURCES := main.cpp +include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/TestFunctionRefs.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/TestFunctionRefs.py new file mode 100644 index 00000000000..c8308c16011 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/TestFunctionRefs.py @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals()) diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/main.cpp b/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/main.cpp new file mode 100644 index 00000000000..a57b0867fb8 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/main.cpp @@ -0,0 +1,32 @@ +// This is plagiarized from lit/SymbolFile/NativePDB/function-types-builtin.cpp. +void nullary() {} + +template<typename Arg> +void unary(Arg) { } + +template<typename A1, typename A2> +void binary(A1, A2) { } + +int varargs(int, int, ...) { return 0; } + +auto &ref = unary<bool>; +auto &ref2 = unary<volatile int*>; +auto &ref3 = varargs; +auto binp = &binary<int*, const int*>; +auto &binr = binary<int*, const int*>; +auto null = &nullary; +int main(int argc, char **argv) { +//% self.expect("target var ref", substrs=["(void (&)(bool))", "ref = 0x", +//% "&::ref = <no summary available>"]) +//% self.expect("target var ref2", +//% substrs=["(void (&)(volatile int *))", "ref2 = 0x"]) +//% self.expect("target var ref3", +//% substrs=["(int (&)(int, int, ...))", "ref3 = 0x"]) +//% self.expect("target var binp", +//% substrs=["(void (*)(int *, const int *))", "binp = 0x"]) +//% self.expect("target var binr", +//% substrs=["(void (&)(int *, const int *))", "binr = 0x"]) +//% self.expect("target var null", +//% substrs=["(void (*)())", "null = 0x"]) + return 0; +} |