You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang/test/Analysis/string.cpp
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -53,3 +53,7 @@ struct TestNotNullTerm {
53
53
strlen((char *)&x); // expected-warning{{Argument to string length function is not a null-terminated string}}
54
54
}
55
55
};
56
+
57
+
voidtest_notcstring_tempobject() {
58
+
strlen((char[]){'a', 0}); // expected-warning{{Argument to string length function is a C++ temp object of type char[2], which is not a null-terminated string}}
0 commit comments