File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ void Test() {
49
49
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: negative value used as length parameter
50
50
std::string q2 (" test" , 200 );
51
51
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
52
+ std::string t1 (" test" , 5 );
53
+ // CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
52
54
std::string q3 (kText , 200 );
53
55
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
54
56
std::string q4 (kText2 , 200 );
@@ -97,6 +99,8 @@ void Valid() {
97
99
std::string s1 (" test" , 4 );
98
100
std::string s2 (" test" , 3 );
99
101
std::string s3 (" test" );
102
+ std::string s4 (" test\000 " , 5 );
103
+ std::string s6 (" te" " st" , 4 );
100
104
101
105
std::string_view emptyv ();
102
106
std::string_view sv1 (" test" , 4 );
You can’t perform that action at this time.
0 commit comments