summaryrefslogtreecommitdiffstats
path: root/lldb/test/expression_command/call-function/main.cpp
blob: ca43c2eabe5af5a888de273ada8e1038f7fda861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <string>

struct Five
{
    int number;
    const char *name;
};

Five
returnsFive()
{
    Five my_five = { 5, "five" };
    return my_five;
}

int main (int argc, char const *argv[])
{
    std::string str = "Hello world";
    std::cout << str << std::endl;
    std::cout << str.c_str() << std::endl;
    Five main_five = returnsFive();
#if 0
    print str
    print str.c_str()
#endif
    return 0; // Please test these expressions while stopped at this line:
}
OpenPOWER on IntegriCloud