Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. "." for...
authorJim Ingham <jingham@apple.com>
Fri, 25 Mar 2016 01:57:14 +0000 (01:57 +0000)
committerJim Ingham <jingham@apple.com>
Fri, 25 Mar 2016 01:57:14 +0000 (01:57 +0000)
commita1e541bf9fe0253541e6460ed8866f1a4ce0c9dd
treecabc44445df6df157522ea33af070393120e295e
parent68f56243563417be95e7ef6936f7b7fc9dedf580
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
19 files changed:
lldb/include/lldb/API/SBExpressionOptions.h
lldb/include/lldb/Expression/DiagnosticManager.h
lldb/include/lldb/Expression/ExpressionParser.h
lldb/include/lldb/Target/Target.h
lldb/lldb.xcodeproj/project.pbxproj
lldb/packages/Python/lldbsuite/test/expression_command/fixits/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/expression_command/fixits/main.cpp [new file with mode: 0644]
lldb/scripts/interface/SBExpressionOptions.i
lldb/source/API/SBExpressionOptions.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectExpression.h
lldb/source/Expression/DiagnosticManager.cpp
lldb/source/Expression/UserExpression.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h [new file with mode: 0644]
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/source/Target/Target.cpp