2 This is a test to ensure that both lldb is reconstructing the right
3 calling convention for a CXXRecordDecl as represented by:
5 DW_CC_pass_by_reference
8 and to also make sure that the ASTImporter is copying over this
9 setting when importing the CXXRecordDecl via setArgPassingRestrictions.
13 from lldbsuite.test.decorators import *
14 from lldbsuite.test.lldbtest import *
15 from lldbsuite.test import lldbutil
18 class TestArgumentPassingRestrictions(TestBase):
20 mydir = TestBase.compute_mydir(__file__)
22 @skipIf(compiler="clang", compiler_version=['<', '7.0'])
23 def test_argument_passing_restrictions(self):
26 lldbutil.run_to_source_breakpoint(self, '// break here',
27 lldb.SBFileSpec("main.cpp"))
29 self.expect("expr returnPassByRef()",
30 substrs=['(PassByRef)', '= 11223344'])
32 self.expect("expr takePassByRef(p)",
33 substrs=['(int)', '= 42'])