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
):
19 @skipIf(compiler
="clang", compiler_version
=["<", "7.0"])
20 def test_argument_passing_restrictions(self
):
23 lldbutil
.run_to_source_breakpoint(
24 self
, "// break here", lldb
.SBFileSpec("main.cpp")
29 result_type
="PassByRef",
30 result_children
=[ValueCheck(name
="x", value
="11223344")],
33 self
.expect_expr("takePassByRef(p)", result_type
="int", result_value
="42")