[Lldb-commits] [PATCH] D69710: [lldb][NFC] Remove unused ExpressionParser::Parse

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 1 06:29:14 PDT 2019

teemperor created this revision.
teemperor added a reviewer: davide.
teemperor added a project: Upstreaming LLDB's downstream patches.
Herald added subscribers: lldb-commits, JDevlieghere.
Herald added a project: LLDB.

This function is only used internally by ClangExpressionParser. By putting it in the ExpressionParser class all languages
that implement ExpressionParser::Parse have to share the same signature (which forces us in downstream to add
swift-specific arguments to ExpressionParser::Parse which then propagate to ClangExpressionParser and so on).




Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
@@ -77,7 +77,7 @@
   /// \return
   ///     The number of errors encountered during parsing.  0 means
   ///     success.
-  unsigned Parse(DiagnosticManager &diagnostic_manager) override;
+  unsigned Parse(DiagnosticManager &diagnostic_manager);
   bool RewriteExpression(DiagnosticManager &diagnostic_manager) override;
Index: lldb/include/lldb/Expression/ExpressionParser.h
--- lldb/include/lldb/Expression/ExpressionParser.h
+++ lldb/include/lldb/Expression/ExpressionParser.h
@@ -76,17 +76,6 @@
   virtual bool Complete(CompletionRequest &request, unsigned line, unsigned pos,
                         unsigned typed_pos) = 0;
-  /// Parse a single expression and convert it to IR using Clang.  Don't wrap
-  /// the expression in anything at all.
-  ///
-  /// \param[in] diagnostic_manager
-  ///     The diagnostic manager in which to store the errors and warnings.
-  ///
-  /// \return
-  ///     The number of errors encountered during parsing.  0 means
-  ///     success.
-  virtual unsigned Parse(DiagnosticManager &diagnostic_manager) = 0;
   /// Try to use the FixIts in the diagnostic_manager to rewrite the
   /// expression.  If successful, the rewritten expression is stored in the
   /// diagnostic_manager, get it out with GetFixedExpression.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69710.227435.patch
Type: text/x-patch
Size: 1625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191101/bc46984a/attachment.bin>

More information about the lldb-commits mailing list