diff options
| author | Kazu Hirata <kazu@google.com> | 2025-10-19 08:33:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-19 08:33:52 -0700 |
| commit | 5805e4d1a05e5faf805bb28b5ba5604d58834e45 (patch) | |
| tree | dfeb274e627f51e92a301cad8a0940a2b5e072ed /clang/unittests/Format/FormatTestJava.cpp | |
| parent | a0a840a83c19418ed897bcc9a0f3f1605fcc16aa (diff) | |
| download | llvm-5805e4d1a05e5faf805bb28b5ba5604d58834e45.zip llvm-5805e4d1a05e5faf805bb28b5ba5604d58834e45.tar.gz llvm-5805e4d1a05e5faf805bb28b5ba5604d58834e45.tar.bz2 | |
[ADT] Use static_assert in PackedVector (#164142)
This patch replaces an intentionally undefined template
specialization:
template <typename T> class PackedVector<T, 0>;
with:
static_assert(BitNum > 0, "BitNum must be > 0");
This way, the compiler diagnostic on a use of PackedVector<T, 0>
improves from:
error: implicit instantiation of undefined template
'llvm::PackedVector<unsigned int, 0>'
to:
error: static assertion failed due to requirement '0U > 0': BitNum
must be > 0
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
0 files changed, 0 insertions, 0 deletions
