message: [mlir] clang-format Parser.cpp
diff: #include "llvm/ADT/DenseMap.h"
  #include "llvm/Support/SourceMgr.h"
  using namespace mlir;
  -using llvm::SourceMgr;
  using llvm::SMLoc;
  +using llvm::SourceMgr;
  /// Simple enum to make code read better in cases that would otherwise return a
  /// bool value. Failure is "true" in a boolean context.
  -enum ParseResult {
  - ParseSuccess,
  - ParseFailure
  -};
  +enum ParseResult { ParseSuccess, ParseFailure };
  namespace {
  class Parser;
  @@ -508,10 +505,14 @@ Type *Parser::parseFunctionType() {
  ///
  Type *Parser::parseType() {
  switch (getToken().getKind()) {
  - case Token::kw_memref: return parseMemRefType();
  - case Token::kw_tensor: return parseTensorType();
  - case Token::kw_vector: return parseVectorType();
  - case Token::l_paren: return parseFunctionType();
  + case Token::kw_memref:
  + return parseMemRefType();
  + case Token::kw_tensor:
  + return parseTensorType();
  + case Token::kw_vector:
  + return parseVectorType();
  + case Token::l_paren:
  + return parseFunctionType();
  default:
  return parsePrimitiveType();
  }
  @@ -560,7 +561,6 @@ ParseResult Parser::parseTypeList(SmallVectorImpl<Type*> &elements) {
  // Attribute parsing.
  //===----------------------------------------------------------------------===//
  -
  /// Attribute parsing.
  ///
  /// attribute-value ::= bool-literal
  @@ -636,8 +636,8 @@ Attribute *Parser::parseAttribute() {
  /// | `{` attribute-entry (`,` attribute-entry)* `}`
  /// attribute-entry ::= bare-id `:` attribute-value
  ///
  -ParseResult Parser::parseAttributeDict(
  - SmallVectorImpl<NamedAttribute> &attributes) {
  +ParseResult
  +Parser::parseAttributeDict(SmallVectorImpl<NamedAttribute> &attributes) {
  consumeToken(Token::l_brace);
  auto parseElt = [&]() -> ParseResult {
  @@ -652,7 +652,8 @@ ParseResult Parser::parseAttributeDict(
  return emitError("expected ':' in attribute list");
  auto attr = parseAttribute();
  - if (!attr) return ParseFailure;
  + if (!attr)
  + return ParseFailure;
  attributes.push_back({nameId, attr});
  return ParseSuccess;
  @@ -1680,8 +1681,8 @@ ParseResult CFGFunctionParser::parseFunctionBody() {
  auto *bb = elt.second.first;
  if (!bb->getFunction())
  return emitError(elt.second.second,
  - "reference to an undefined basic block '" +
  - elt.first() + "'");
  + "reference to an undefined basic block '" + elt.first() +
  + "'");
  }
  getModule()->functionList.push_back(function);
  