[Mlir-commits] [mlir] 56bf645 - Apply clang-tidy fixes for llvm-else-after-return in Parser.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Aug 29 05:34:16 PDT 2022


Author: Mehdi Amini
Date: 2022-08-29T12:33:05Z
New Revision: 56bf6454c0e45ce2123246567fd116ed5e20e839

URL: https://github.com/llvm/llvm-project/commit/56bf6454c0e45ce2123246567fd116ed5e20e839
DIFF: https://github.com/llvm/llvm-project/commit/56bf6454c0e45ce2123246567fd116ed5e20e839.diff

LOG: Apply clang-tidy fixes for llvm-else-after-return in Parser.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/AsmParser/Parser.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/AsmParser/Parser.cpp b/mlir/lib/AsmParser/Parser.cpp
index 83a6a35350de4..a48a25870ca3f 100644
--- a/mlir/lib/AsmParser/Parser.cpp
+++ b/mlir/lib/AsmParser/Parser.cpp
@@ -242,7 +242,8 @@ OptionalParseResult Parser::parseOptionalInteger(APInt &result) {
   if (consumeIf(Token::kw_false)) {
     result = false;
     return success();
-  } else if (consumeIf(Token::kw_true)) {
+  }
+  if (consumeIf(Token::kw_true)) {
     result = true;
     return success();
   }


        


More information about the Mlir-commits mailing list