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

Mehdi Amini llvmlistbot at llvm.org
Tue Feb 20 14:15:11 PST 2024


Author: Mehdi Amini
Date: 2024-02-20T14:14:38-08:00
New Revision: dd5696cdefaff2b3ee9c4de3053e31630863588c

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

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

Added: 
    

Modified: 
    mlir/unittests/Bytecode/BytecodeTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Bytecode/BytecodeTest.cpp b/mlir/unittests/Bytecode/BytecodeTest.cpp
index bb7241c2d51969..a37a2afc226453 100644
--- a/mlir/unittests/Bytecode/BytecodeTest.cpp
+++ b/mlir/unittests/Bytecode/BytecodeTest.cpp
@@ -23,7 +23,7 @@
 using namespace llvm;
 using namespace mlir;
 
-StringLiteral IRWithResources = R"(
+StringLiteral irWithResources = R"(
 module @TestDialectResources attributes {
   bytecode.test = dense_resource<resource> : tensor<4xi32>
 } {}
@@ -42,7 +42,7 @@ TEST(Bytecode, MultiModuleWithResource) {
   Builder builder(&context);
   ParserConfig parseConfig(&context);
   OwningOpRef<Operation *> module =
-      parseSourceString<Operation *>(IRWithResources, parseConfig);
+      parseSourceString<Operation *>(irWithResources, parseConfig);
   ASSERT_TRUE(module);
 
   // Write the module to bytecode
@@ -53,15 +53,15 @@ TEST(Bytecode, MultiModuleWithResource) {
 
   // Create copy of buffer which is aligned to requested resource alignment.
   constexpr size_t kAlignment = 0x20;
-  size_t buffer_size = buffer.size();
-  buffer.reserve(buffer_size + kAlignment - 1);
+  size_t bufferSize = buffer.size();
+  buffer.reserve(bufferSize + kAlignment - 1);
   size_t pad = ~(uintptr_t)buffer.data() + 1 & kAlignment - 1;
   buffer.insert(0, pad, ' ');
-  StringRef aligned_buffer(buffer.data() + pad, buffer_size);
+  StringRef alignedBuffer(buffer.data() + pad, bufferSize);
 
   // Parse it back
   OwningOpRef<Operation *> roundTripModule =
-      parseSourceString<Operation *>(aligned_buffer, parseConfig);
+      parseSourceString<Operation *>(alignedBuffer, parseConfig);
   ASSERT_TRUE(roundTripModule);
 
   // FIXME: Parsing external resources does not work on big-endian


        


More information about the Mlir-commits mailing list