[Mlir-commits] [mlir] 1cf4cc0 - Apply clang-tidy fixes for readability-identifier-naming in TestBytecodeCallbacks.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Feb 19 16:41:50 PST 2024


Author: Mehdi Amini
Date: 2024-02-19T16:41:28-08:00
New Revision: 1cf4cc007be0255fa74f7ed04fb16be6dee1cce5

URL: https://github.com/llvm/llvm-project/commit/1cf4cc007be0255fa74f7ed04fb16be6dee1cce5
DIFF: https://github.com/llvm/llvm-project/commit/1cf4cc007be0255fa74f7ed04fb16be6dee1cce5.diff

LOG: Apply clang-tidy fixes for readability-identifier-naming in TestBytecodeCallbacks.cpp (NFC)

Added: 
    

Modified: 
    mlir/test/lib/IR/TestBytecodeRoundtrip.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/test/lib/IR/TestBytecodeRoundtrip.cpp b/mlir/test/lib/IR/TestBytecodeRoundtrip.cpp
index a00908bcbad601..e668224d343234 100644
--- a/mlir/test/lib/IR/TestBytecodeRoundtrip.cpp
+++ b/mlir/test/lib/IR/TestBytecodeRoundtrip.cpp
@@ -24,17 +24,17 @@ using namespace llvm;
 namespace {
 class TestDialectVersionParser : public cl::parser<test::TestDialectVersion> {
 public:
-  TestDialectVersionParser(cl::Option &O)
-      : cl::parser<test::TestDialectVersion>(O) {}
+  TestDialectVersionParser(cl::Option &o)
+      : cl::parser<test::TestDialectVersion>(o) {}
 
-  bool parse(cl::Option &O, StringRef /*argName*/, StringRef arg,
+  bool parse(cl::Option &o, StringRef /*argName*/, StringRef arg,
              test::TestDialectVersion &v) {
-    long long major_, minor_;
-    if (getAsSignedInteger(arg.split(".").first, 10, major_))
-      return O.error("Invalid argument '" + arg);
-    if (getAsSignedInteger(arg.split(".").second, 10, minor_))
-      return O.error("Invalid argument '" + arg);
-    v = test::TestDialectVersion(major_, minor_);
+    long long major, minor;
+    if (getAsSignedInteger(arg.split(".").first, 10, major))
+      return o.error("Invalid argument '" + arg);
+    if (getAsSignedInteger(arg.split(".").second, 10, minor))
+      return o.error("Invalid argument '" + arg);
+    v = test::TestDialectVersion(major, minor);
     // Returns true on error.
     return false;
   }
@@ -182,12 +182,12 @@ struct TestBytecodeRoundtripPass
           if (failed(reader.readVarInt(encoding)) || encoding != 999)
             return success();
           llvm::outs() << "Overriding parsing of IntegerType encoding...\n";
-          uint64_t _widthAndSignedness, width;
+          uint64_t widthAndSignedness, width;
           IntegerType::SignednessSemantics signedness;
-          if (succeeded(reader.readVarInt(_widthAndSignedness)) &&
-              ((width = _widthAndSignedness >> 2), true) &&
+          if (succeeded(reader.readVarInt(widthAndSignedness)) &&
+              ((width = widthAndSignedness >> 2), true) &&
               ((signedness = static_cast<IntegerType::SignednessSemantics>(
-                    _widthAndSignedness & 0x3)),
+                    widthAndSignedness & 0x3)),
                true))
             entry = IntegerType::get(reader.getContext(), width, signedness);
           // Return nullopt to fall through the rest of the parsing code path.


        


More information about the Mlir-commits mailing list