[PATCH] D115380: ADT: Make SmallVector::set_size() private
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 8 13:52:34 PST 2021
dexonsmith added inline comments.
================
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); }
+
----------------
dblaikie wrote:
> 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?
My goal was to downgrade from `protected` to `private`, since there's no reason to let subclasses of SmallVectorImpl access this either. WDYT? Not worth it? Better comment?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115380/new/
https://reviews.llvm.org/D115380
More information about the llvm-commits
mailing list