[PATCH] D35787: [clang-tidy] Ignore vector<bool> in inefficient-vector-operation.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 06:33:04 PST 2018


alexfh added a comment.

In https://reviews.llvm.org/D35787#830351, @hokein wrote:

> In https://reviews.llvm.org/D35787#819007, @alexfh wrote:
>
> > Should we look at whether the size is statically known?
>
>
> Do you mean the size of the template type T in `vector<T>`?  STL only provides a template specialization for `std::vector<bool>`, so I think excluding `vector<bool>` is probably enough, or am I missing anything here?


I meant the size of the vector, i.e. the number of elements that is going to be pushed into it. Is it still reasonable to exempt vector<bool>, if, say, a million of bools is pushed into it?


https://reviews.llvm.org/D35787





More information about the cfe-commits mailing list