aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h')
-rw-r--r--source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h38
1 files changed, 34 insertions, 4 deletions
diff --git a/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h b/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
index 4058ec1270b3..03ff55f614d5 100644
--- a/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
+++ b/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
@@ -20,6 +20,10 @@
#include <string>
#include <vector>
+namespace clang {
+class CodeCompleteConsumer;
+}
+
namespace lldb_private {
class IRExecutionUnit;
@@ -58,6 +62,9 @@ public:
//------------------------------------------------------------------
~ClangExpressionParser() override;
+ bool Complete(CompletionRequest &request, unsigned line, unsigned pos,
+ unsigned typed_pos) override;
+
//------------------------------------------------------------------
/// Parse a single expression and convert it to IR using Clang. Don't wrap
/// the expression in anything at all.
@@ -143,16 +150,39 @@ public:
std::string GetClangTargetABI(const ArchSpec &target_arch);
private:
+ //------------------------------------------------------------------
+ /// Parses the expression.
+ ///
+ /// @param[in] diagnostic_manager
+ /// The diagnostic manager that should receive the diagnostics
+ /// from the parsing process.
+ ///
+ /// @param[in] completion
+ /// The completion consumer that should be used during parsing
+ /// (or a nullptr if no consumer should be attached).
+ ///
+ /// @param[in] completion_line
+ /// The line in which the completion marker should be placed.
+ /// The first line is represented by the value 0.
+ ///
+ /// @param[in] completion_column
+ /// The column in which the completion marker should be placed.
+ /// The first column is represented by the value 0.
+ ///
+ /// @return
+ /// The number of parsing errors.
+ //-------------------------------------------------------------------
+ unsigned ParseInternal(DiagnosticManager &diagnostic_manager,
+ clang::CodeCompleteConsumer *completion = nullptr,
+ unsigned completion_line = 0,
+ unsigned completion_column = 0);
+
std::unique_ptr<llvm::LLVMContext>
m_llvm_context; ///< The LLVM context to generate IR into
std::unique_ptr<clang::FileManager>
m_file_manager; ///< The Clang file manager object used by the compiler
std::unique_ptr<clang::CompilerInstance>
m_compiler; ///< The Clang compiler used to parse expressions into IR
- std::unique_ptr<clang::Builtin::Context>
- m_builtin_context; ///< Context for Clang built-ins
- std::unique_ptr<clang::SelectorTable>
- m_selector_table; ///< Selector table for Objective-C methods
std::unique_ptr<clang::CodeGenerator>
m_code_generator; ///< The Clang object that generates IR