[all-commits] [llvm/llvm-project] 843a97: Add a warning for builtin_return_address/frame_add...
Erich Keane via All-commits
all-commits at lists.llvm.org
Mon Mar 9 10:43:25 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 843a9778fcd5ef93804fc22de04af9ab8c8b20a9
https://github.com/llvm/llvm-project/commit/843a9778fcd5ef93804fc22de04af9ab8c8b20a9
Author: Jeremy Stenglein <jstenglein at gmail.com>
Date: 2020-03-09 (Mon, 09 Mar 2020)
Changed paths:
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaChecking.cpp
M clang/test/Misc/warning-wall.c
Log Message:
-----------
Add a warning for builtin_return_address/frame_address with > 0 argument
Clang is missing a warning for
builtin_return_address/builtin_frame_address called with > 0 argument.
Gcc provides a warning for this via -Wframe-address:
https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html
As calling these functions with argument > 0 has caused several crashes
for us, we would like to have the same warning as gcc here. This diff
adds the warning and makes it part of -Wmost.
Differential Revision: https://reviews.llvm.org/D75768
More information about the All-commits
mailing list