We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 088ac1f commit 9c985b3Copy full SHA for 9c985b3
1 file changed
test/cfg/std.cpp
@@ -4982,6 +4982,18 @@ std::span<const int> returnDanglingLifetime_std_span1() {
4982
}
4983
#endif
4984
4985
+void* returnDanglingLifetime_memcpy() { // #14833
4986
+ char a[4];
4987
+ // cppcheck-suppress returnDanglingLifetime
4988
+ return memcpy(a, "abc", 4);
4989
+}
4990
+
4991
+wchar_t* returnDanglingLifetime_wcscat() {
4992
+ wchar_t a[10]{L"abc"};
4993
4994
+ return wcscat(a, L"def");
4995
4996
4997
void beginEnd()
4998
{
4999
std::vector<int> v;
0 commit comments