Files
clang-p2996/lldb/test/API/commands/expression/fixits/main.cpp
Augusto Noronha fbaf367217 [lldb] Show fix-it applied even if expression didn't evaluate succesfully
If we applied a fix-it before evaluating an expression and that
expression didn't evaluate correctly, we should still tell users about
the fix-it we applied since that may be the reason why it didn't work
correctly.

Differential Revision: https://reviews.llvm.org/D109908
2021-09-23 16:45:04 -03:00

27 lines
399 B
C++

#include <stdio.h>
struct SubStruct
{
int a;
int b;
};
struct MyStruct
{
int first;
struct SubStruct second;
};
int
main()
{
struct MyStruct my_struct = {10, {20, 30}};
struct MyStruct *my_pointer = &my_struct;
struct MyStruct *null_pointer = nullptr;
printf ("Stop here to evaluate expressions: %d %d %p\n", my_pointer->first, my_pointer->second.a, my_pointer);
return 0;
}