[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 12:15:57 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">,
----------------
AaronBallman wrote:

```suggestion
  "calling '%0' in function not marked '__attribute__((noinline))' may return a caller's %1 address">,
```
You should also add single quotes here because it's using a syntactic construct.

https://github.com/llvm/llvm-project/pull/82966


More information about the cfe-commits mailing list