[PATCH] D139570: Add -Wreturn-local-addr, GCC alias for -Wreturn-stack-address
Adrian Dole via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 7 12:33:19 PST 2022
adriandole created this revision.
Herald added a subscriber: jeroen.dobbelaere.
Herald added a project: All.
adriandole requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139570
Files:
clang/include/clang/Basic/DiagnosticGroups.td
Index: clang/include/clang/Basic/DiagnosticGroups.td
===================================================================
--- clang/include/clang/Basic/DiagnosticGroups.td
+++ clang/include/clang/Basic/DiagnosticGroups.td
@@ -413,6 +413,8 @@
def DanglingInitializerList : DiagGroup<"dangling-initializer-list">;
def DanglingGsl : DiagGroup<"dangling-gsl">;
def ReturnStackAddress : DiagGroup<"return-stack-address">;
+// Name of this warning in GCC
+def : DiagGroup<"return-local-addr", [ReturnStackAddress]>;
def Dangling : DiagGroup<"dangling", [DanglingField,
DanglingInitializerList,
DanglingGsl,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139570.481013.patch
Type: text/x-patch
Size: 682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221207/755b0b3a/attachment.bin>
More information about the cfe-commits
mailing list