teak-llvm/lldb/packages/Python/lldbsuite/test/expression_command/fixits/main.cpp
Jim Ingham a1e541bf9f Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. "." for "->".)
This feature is controlled by an expression command option, a target property and the
SBExpressionOptions setting.  FixIt's are only applied to UserExpressions, not UtilityFunctions,
those you have to get right when you make them.

This is just a first stage.  At present the fixits are applied silently.  The next step
is to tell the user about the applied fixit.

<rdar://problem/25351938>

llvm-svn: 264379
2016-03-25 01:57:14 +00:00

26 lines
356 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;
printf ("Stop here to evaluate expressions: %d %d %p\n", my_pointer->first, my_pointer->second.a, my_pointer);
return 0;
}