[Mlir-commits] [mlir] 21fee09 - Use .empty() instead of .size() == 0 (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri May 29 20:37:19 PDT 2020


Author: Mehdi Amini
Date: 2020-05-30T03:36:22Z
New Revision: 21fee0921d563f407e07b5e28592c2925da3704d

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

LOG: Use .empty() instead of .size() == 0 (NFC)

Cleanup / Fix a clang-tidy warning

Added: 
    

Modified: 
    mlir/lib/Transforms/BufferPlacement.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/BufferPlacement.cpp b/mlir/lib/Transforms/BufferPlacement.cpp
index 60f49d4e305c..337e26e2a65b 100644
--- a/mlir/lib/Transforms/BufferPlacement.cpp
+++ b/mlir/lib/Transforms/BufferPlacement.cpp
@@ -392,7 +392,7 @@ struct BufferPlacementPass
       // If the Dealloc position is at the terminator operation of the block,
       // then the value should escape from a deallocation.
       if (!nextOp) {
-        assert(deallocs.size() == 0 &&
+        assert(deallocs.empty() &&
                "There should be no dealloc for the returned buffer");
         continue;
       }


        


More information about the Mlir-commits mailing list