[PATCH] D121853: [scudo][NFC] Suppress warnings for missing-noreturn, conditional-uninitialized, zero-length-array
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 11:56:07 PDT 2022
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/memtag.h:46
+#pragma clang diagnostic ignored "-Wmissing-noreturn"
inline uptr archMemoryTagGranuleSize() {
UNREACHABLE("memory tagging not supported");
----------------
can you avoid pragmas with NORETURN?
================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:247-274
if (Found) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconditional-uninitialized"
*H = reinterpret_cast<LargeBlock::Header *>(
LargeBlock::addHeaderTag<Config>(HeaderPos));
+#pragma clang diagnostic pop
*Zeroed = Entry.Time == 0;
----------------
================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:248
if (Found) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconditional-uninitialized"
----------------
Please don't mix different warning types in a single patch?
================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:400
CachedBlock Entries[Config::SecondaryCacheEntriesArraySize] = {};
+#pragma clang diagnostic push
----------------
Can you avoid this by extractioing Quarantine with template specialization
```
class <size_t Size>
class Quarantine {
doStuff1() {blocks...}
doStuff2() {blocks...}
private
CachedBlock blocks[Size];
};
template<> class Quarantine<0> {
doStuff1() {}
doStuff2() {}
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121853/new/
https://reviews.llvm.org/D121853
More information about the llvm-commits
mailing list