[PATCH] D26087: [LLVM] Fix some Clang-tidy readability-redundant-member-init and Include What You Use warnings; other minor fixes

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 10:35:48 PST 2016


mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.

Thanks for the cleanup. See some suggestion inline.



================
Comment at: include/llvm/CodeGen/LivePhysRegs.h:54
   /// \brief Constructs a new empty LivePhysRegs set.
-  LivePhysRegs() : TRI(nullptr), LiveRegs() {}
+  LivePhysRegs() : TRI(nullptr) {}
 
----------------
I'd change `const TargetRegisterInfo *TRI = nullptr;`, and this to `= default;`


================
Comment at: include/llvm/Support/RWMutex.h:94
     public:
-      explicit SmartRWMutex() : impl(), readers(0), writers(0) { }
+      explicit SmartRWMutex() : readers(0), writers(0) {}
 
----------------
Same here: `unsigned readers = 0, writers = 0;` and `= default;`


Repository:
  rL LLVM

https://reviews.llvm.org/D26087





More information about the llvm-commits mailing list