[Lldb-commits] [PATCH] D17273: refactor/cleanup ClangExpressionParser::Parse

Luke Drummond via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 15 11:37:01 PST 2016


ldrumm created this revision.
ldrumm added reviewers: clayborg, zturner, spyffe.
ldrumm added a subscriber: lldb-commits.

  - fix return type: `ClangExpressionParser::Parse` returns unsigned, but was actually returning a signed value, `num_errors`.
  - use helper `clang::TextDiagnosticBuffer::getNumErrors()` instead of counting the errors ourself.
  - limit scoping of block-level automatic variables as much as practical.
  - remove reused multipurpose `TextDiagnosticBuffer::const_iterator` in favour of loop-scoped `err`, `warn`, and `note` variables in the diagnostic printing code.
  - refactor diagnostic printing loops to use a proper loop invariant.


http://reviews.llvm.org/D17273

Files:
  source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17273.48002.patch
Type: text/x-patch
Size: 4644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160215/622c43ff/attachment.bin>


More information about the lldb-commits mailing list