[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 2 14:15:28 PST 2024
================
@@ -2029,6 +2029,10 @@ def warn_frame_address : Warning<
"calling '%0' with a nonzero argument is unsafe">,
InGroup<FrameAddress>, DefaultIgnore;
+def warn_frame_address_missing_noinline: Warning<
+ "calling '%0' in function not marked __attribute__((noinline)) may return a caller's %1 address">,
----------------
Sirraide wrote:
This is a minor thing, but you should probably use `%select` for `%1` here instead of passing in e.g. `"frame"` as a string. The `%0` is fine imo because it’s the name of a builtin function.
https://github.com/llvm/llvm-project/pull/82966
More information about the cfe-commits
mailing list