Change the this -W flag to 'return-stack-address'.

~or~

Paint the bikeshed green.

llvm-svn: 136959
This commit is contained in:
Chandler Carruth 2011-08-05 02:11:36 +00:00
parent 05c998ceda
commit 5e88304ef5
1 changed files with 5 additions and 5 deletions

View File

@ -4158,19 +4158,19 @@ def warn_scanf_scanlist_incomplete : Warning<
// CHECK: returning address/reference of stack memory // CHECK: returning address/reference of stack memory
def warn_ret_stack_addr : Warning< def warn_ret_stack_addr : Warning<
"address of stack memory associated with local variable %0 returned">, "address of stack memory associated with local variable %0 returned">,
InGroup<DiagGroup<"return-local-address">>; InGroup<DiagGroup<"return-stack-address">>;
def warn_ret_stack_ref : Warning< def warn_ret_stack_ref : Warning<
"reference to stack memory associated with local variable %0 returned">, "reference to stack memory associated with local variable %0 returned">,
InGroup<DiagGroup<"return-local-address">>; InGroup<DiagGroup<"return-stack-address">>;
def warn_ret_local_temp_addr : Warning< def warn_ret_local_temp_addr : Warning<
"returning address of local temporary object">, "returning address of local temporary object">,
InGroup<DiagGroup<"return-local-address">>; InGroup<DiagGroup<"return-stack-address">>;
def warn_ret_local_temp_ref : Warning< def warn_ret_local_temp_ref : Warning<
"returning reference to local temporary object">, "returning reference to local temporary object">,
InGroup<DiagGroup<"return-local-address">>; InGroup<DiagGroup<"return-stack-address">>;
def warn_ret_addr_label : Warning< def warn_ret_addr_label : Warning<
"returning address of label, which is local">, "returning address of label, which is local">,
InGroup<DiagGroup<"return-local-address">>; InGroup<DiagGroup<"return-stack-address">>;
def err_ret_local_block : Error< def err_ret_local_block : Error<
"returning block that lives on the local stack">; "returning block that lives on the local stack">;
def note_ref_var_local_bind : Note< def note_ref_var_local_bind : Note<