[LoopInterchange] Hoist isComputableLoopNest() in the control flow (#124247)
[llvm-project.git] / lldb / test / API / commands / expression / call-function / TestCallStdStringFunction.py
blobca2d2d0177eec952221f4631d47980eeb19afb75
1 """
2 Test calling std::String member functions.
3 """
5 import lldb
6 from lldbsuite.test.decorators import *
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test import lldbutil
11 class ExprCommandCallFunctionTestCase(TestBase):
12 @expectedFailureAll(
13 compiler="icc", bugnumber="llvm.org/pr14437, fails with ICC 13.1"
15 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
16 @skipIf(compiler="clang", compiler_version=["<", "9.0"])
17 def test_with(self):
18 """Test calling std::String member function."""
19 self.build()
20 lldbutil.run_to_source_breakpoint(
21 self, "// break here", lldb.SBFileSpec("main.cpp")
24 self.expect("expression str", substrs=["Hello world"])
26 # Calling this function now succeeds, but we follow the typedef return type through to
27 # const char *, and thus don't invoke the Summary formatter.
29 # clang's libstdc++ on ios arm64 inlines std::string::c_str() always;
30 # skip this part of the test.
31 triple = self.dbg.GetSelectedPlatform().GetTriple()
32 do_cstr_test = True
33 if triple in [
34 "arm64-apple-ios",
35 "arm64e-apple-ios",
36 "arm64-apple-tvos",
37 "armv7k-apple-watchos",
38 "arm64-apple-bridgeos",
39 "arm64_32-apple-watchos",
41 do_cstr_test = False
42 if do_cstr_test:
43 self.expect("expression str.c_str()", substrs=["Hello world"])