We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code, with clang trunk and -std=c++17, produces a warning that I believe to be a false positive.
---- code ---- #include #include <string_view>
std::string_view foo() { std::optionalstd::string_view sv("abc"); return *sv; // unwanted [-Wreturn-stack-address] warning } ---- code ----
See https://godbolt.org/z/vTs3Kk
This is a regression since clang 9.0
The text was updated successfully, but these errors were encountered:
Re-checking this issue I find that the reproducing test case is now fixed on gcc-trunk.
(Tested with the godbolt link in the original comment on 2020-02-19)
I have marked this particular issue with -Wreturn-stack-address as resolved
Sorry, something went wrong.
s/gcc-trunk/clang-trunk/ (Still recovering from WG21 in Prague)
No branches or pull requests
Extended Description
The following code, with clang trunk and -std=c++17, produces a warning that I believe to be a false positive.
---- code ----
#include
#include <string_view>
std::string_view foo()
{
std::optionalstd::string_view sv("abc");
return *sv; // unwanted [-Wreturn-stack-address] warning
}
---- code ----
See https://godbolt.org/z/vTs3Kk
This is a regression since clang 9.0
The text was updated successfully, but these errors were encountered: