[PATCH] D115380: ADT: Make SmallVector::set_size() private
    David Blaikie via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Dec  8 13:42:12 PST 2021
    
    
  
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Sounds good - if the only places we're trying to use unitiliazide values is where they're POD (can you confirm that's the case/maybe mention it in the commit message that the extra power was unneeded), then removing this more powerful version that could be used for non-POD uninitialized values seems helpful.
================
Comment at: llvm/include/llvm/ADT/SmallVector.h:587-589
+  // Hide set_size() to avoid misuse.
+  void set_size(size_type N) { SuperClass::set_size(N); }
+
----------------
I think maybe this can be removed entirely - all the call sites use "this->set_size", so I think they'd find that in the base class?
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115380/new/
https://reviews.llvm.org/D115380
    
    
More information about the llvm-commits
mailing list