summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/expression_command/anonymous-struct
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 18:01:57 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 18:01:57 +0000
commit88c643b6fec27eec436c8d138fee6346e92337d6 (patch)
tree82cd13b2f3cde1c9e5f79689ba4e6ba67694843f /packages/Python/lldbsuite/test/expression_command/anonymous-struct
parent94994d372d014ce4c8758b9605d63fae651bd8aa (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/expression_command/anonymous-struct')
-rw-r--r--packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile5
-rw-r--r--packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py45
-rw-r--r--packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp26
3 files changed, 0 insertions, 76 deletions
diff --git a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile b/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
deleted file mode 100644
index 8a7102e347af2..0000000000000
--- a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py b/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
deleted file mode 100644
index 1108b12153295..0000000000000
--- a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test calling user defined functions using expression evaluation.
-This test checks that typesystem lookup works correctly for typedefs of
-untagged structures.
-
-Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
-"""
-
-from __future__ import print_function
-
-import lldb
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestExprLookupAnonStructTypedef(TestBase):
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- TestBase.setUp(self)
- # Find the breakpoint
- self.line = line_number('main.cpp', '// lldb testsuite break')
-
- @expectedFailureAll(
- oslist=['linux'],
- archs=['arm'],
- bugnumber="llvm.org/pr27868")
- def test(self):
- """Test typedeffed untagged struct arguments for function call expressions"""
- self.build()
-
- self.runCmd("file "+self.getBuildArtifact("a.out"),
- CURRENT_EXECUTABLE_SET)
- lldbutil.run_break_set_by_file_and_line(
- self,
- "main.cpp",
- self.line,
- num_expected_locations=-1,
- loc_exact=True
- )
-
- self.runCmd("run", RUN_SUCCEEDED)
- self.expect("expr multiply(&s)", substrs=['$0 = 1'])
diff --git a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp b/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
deleted file mode 100644
index 5b170c5f943a4..0000000000000
--- a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <tgmath.h>
-
-typedef struct {
- float f;
- int i;
-} my_untagged_struct;
-
-double multiply(my_untagged_struct *s)
-{
- return s->f * s->i;
-}
-
-double multiply(my_untagged_struct *s, int x)
-{
- return multiply(s) * x;
-}
-
-int main(int argc, char **argv)
-{
- my_untagged_struct s = {
- .f = (float)argc,
- .i = argc,
- };
- // lldb testsuite break
- return !(multiply(&s, argc) == pow(argc, 3));
-}