Files
clang-p2996/llvm/lib/Support/SmallVector.cpp
Andrei Golubev 5fb39efe68 [LLVM][ADT] Explicitly convert size_t values to SmallVector's size type (#77939)
Multiple places rely on implicit conversion when assigning 'size_t'
values to the member fields (size or capacity) of SmallVector.

Depending on the platform / compiler configuration, this may result in
narrowing conversion warnings (especially given that the size type of
SmallVector's member fields is determined based on type T - in
SmallVector<T>). To avoid the problem altogether, make the conversions
explicit.

Co-authored-by: Orest Chura <orest.chura@intel.com>
2024-01-22 00:39:11 -08:00

7.0 KiB