[PATCH] D24541: [LLVM] Fix some Clang-tidy readability-container-size-empty and Include What You Use warnings in headers; other minor fixes

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 13:37:46 PDT 2016


mehdi_amini added inline comments.

================
Comment at: include/llvm/CodeGen/LiveRangeEdit.h:158
@@ -151,1 +157,3 @@
+  unsigned size() const { return NewRegs.size() - FirstNew; }
+  bool empty() const { return NewRegs.size() == FirstNew; }
   unsigned get(unsigned idx) const { return NewRegs[idx+FirstNew]; }
----------------
I don't really understand how it is more clear or better? I prefer the other version of empty() FWIW.



Repository:
  rL LLVM

https://reviews.llvm.org/D24541





More information about the llvm-commits mailing list