diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-23 21:21:22 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-23 21:21:22 +0000 |
commit | afe48f9d68e446829bed6ce72b319c915873809a (patch) | |
tree | cf4d1852819f96f709701e9e7c9b6088d77d74c5 /clang/test/Analysis/stack-addr-ps.cpp | |
parent | f9f50f634d4d6cae8d844b5a7b764e1159dce8e4 (diff) | |
download | bcm5719-llvm-afe48f9d68e446829bed6ce72b319c915873809a.tar.gz bcm5719-llvm-afe48f9d68e446829bed6ce72b319c915873809a.zip |
Fold -Wreturn-stack-address into general initialization lifetime
checking.
llvm-svn: 337743
Diffstat (limited to 'clang/test/Analysis/stack-addr-ps.cpp')
-rw-r--r-- | clang/test/Analysis/stack-addr-ps.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Analysis/stack-addr-ps.cpp b/clang/test/Analysis/stack-addr-ps.cpp index 79afd18e188..e1f06835c78 100644 --- a/clang/test/Analysis/stack-addr-ps.cpp +++ b/clang/test/Analysis/stack-addr-ps.cpp @@ -91,8 +91,8 @@ struct TS { // rdar://11345441 int* f5() { - int& i = i; // expected-warning {{Assigned value is garbage or undefined}} expected-note {{binding reference variable 'i' here}} expected-warning{{reference 'i' is not yet bound to a value when used within its own initialization}} - return &i; // expected-warning {{address of stack memory associated with local variable 'i' returned}} + int& i = i; // expected-warning {{Assigned value is garbage or undefined}} expected-warning{{reference 'i' is not yet bound to a value when used within its own initialization}} + return &i; } void *radar13226577() { |