mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 16:41:43 +00:00
Add -Wreturn-local-addr, GCC alias for -Wreturn-stack-address
For warning compatibility with GCC. Reviewed By: cjdb Differential Revision: https://reviews.llvm.org/D139570
This commit is contained in:
parent
824874c8d4
commit
8effeb44f4
@ -449,6 +449,7 @@ Improvements to Clang's diagnostics
|
||||
concepts-ts compatibility extension.
|
||||
- Clang now diagnoses overflow undefined behavior in a constant expression while
|
||||
evaluating a compound assignment with remainder as operand.
|
||||
- Add ``-Wreturn-local-addr``, a GCC alias for ``-Wreturn-stack-address``.
|
||||
|
||||
Non-comprehensive list of changes in this release
|
||||
-------------------------------------------------
|
||||
|
@ -413,6 +413,8 @@ def DanglingField : DiagGroup<"dangling-field">;
|
||||
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,
|
||||
|
@ -1,4 +1,5 @@
|
||||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -std=c++11 %s
|
||||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -std=c++11 -Wno-return-stack-address -Wreturn-local-addr %s
|
||||
|
||||
namespace PR26599 {
|
||||
template <typename>
|
||||
|
Loading…
x
Reference in New Issue
Block a user