[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
Sat Mar 26 01:25:34 PDT 2022


vitalybuka added a comment.

zero-length-array in description is not needed



================
Comment at: compiler-rt/lib/scudo/standalone/memtag.h:46
+#pragma clang diagnostic ignored "-Wmissing-noreturn"
 inline uptr archMemoryTagGranuleSize() {
   UNREACHABLE("memory tagging not supported");
----------------
ddcc wrote:
> vitalybuka wrote:
> > can you avoid pragmas with NORETURN?
> Sorry, I don't understand the question. The `UNREACHABLE` macro calls the `die()` function that is labeled with `NORETURN`, which causes the compiler to warn about functions that don't return but that aren't labeled `NORETURN`. I can remove `NORETURN` from that function, but that would also require changing its' callers as well, such as `dieOnMapUnmapError`.
I am asking about:
NORETURN inline uptr archMemoryTagGranuleSize() 

If this does not suppress the warning then just
return 0;

Which compiler do you use?
Can you paste warning content with context?


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