NFC: Cleanup a switch statement that only has a default case.
authorRiver Riddle <riverriddle@google.com>
Sun, 26 May 2019 20:01:39 +0000 (13:01 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 03:03:52 +0000 (20:03 -0700)
--

PiperOrigin-RevId: 250062529

mlir/lib/Parser/Parser.cpp

index c2761a2..a1e2b09 100644 (file)
@@ -2475,14 +2475,9 @@ ParseResult FunctionParser::parseBlockBody(Block *block) {
   builder.setInsertionPointToEnd(block);
 
   // Parse the list of operations that make up the body of the block.
-  while (getToken().isNot(Token::caret_identifier, Token::r_brace)) {
-    switch (getToken().getKind()) {
-    default:
-      if (parseOperation())
-        return failure();
-      break;
-    }
-  }
+  while (getToken().isNot(Token::caret_identifier, Token::r_brace))
+    if (parseOperation())
+      return failure();
 
   return success();
 }