Lines Matching refs:strlen
35 // strlen()
38 #define strlen BUILTIN(strlen)
39 size_t strlen(const char *s);
42 clang_analyzer_eval(strlen("123") == 3); // expected-warning{{TRUE}}
47 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{TRUE}}
52 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{TRUE}}
55 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{UNKNOWN}}
59 return strlen(0); // expected-warning{{Null pointer argument in call to string length function}}
63 return strlen((char*)&strlen_fn); // expected-warning{{Argument to string length function is the address of the function 'strlen_fn', which is not a null-terminated string}}
68 return strlen((char*)&&label); // expected-warning{{Argument to string length function is the address of the label 'label', which is not a null-terminated string}}
78 size_t a = strlen(z.a);
80 size_t b = strlen(z.a);
86 size_t c = strlen(z.a);
93 size_t a = strlen(x);
94 size_t b = strlen(x);
100 size_t c = strlen(x);
107 size_t a = strlen(global_str);
108 size_t b = strlen(global_str);
112 clang_analyzer_eval(strlen(global_str) == 0); // expected-warning{{TRUE}}
118 size_t c = strlen(global_str);
124 size_t a = strlen(x);
127 size_t b = strlen(x);
134 size_t c = strlen(x);
140 size_t a = strlen(x);
146 size_t c = strlen(x);
152 if (strlen(x) < 5)
154 clang_analyzer_eval(strlen(x) < 5); // expected-warning{{FALSE}}
225 clang_analyzer_eval(strnlen(x, 10) == strlen(x)); // expected-warning{{UNKNOWN}}
289 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{TRUE}}
296 if (strlen(y) == 4)
302 if (strlen(y) == 3)
328 clang_analyzer_eval(stpcpy(x, y) == &x[strlen(y)]); // expected-warning{{TRUE}}
329 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{TRUE}}
335 if (strlen(y) == 4)
341 if (strlen(y) == 3)
378 size_t orig_len = strlen(x);
381 if (strlen(y) != 4)
385 clang_analyzer_eval((int)strlen(x) == (orig_len + strlen(y))); // expected-warning{{TRUE}}
390 if (strlen(y) == 4)
396 if (strlen(y) == 3)
402 if (strlen(y) == 2)
408 if (strlen(y) == 2)
414 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
420 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
426 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
430 // length for the "before" strlen, we won't be able to set one for "after".
433 if (strlen(dst) != (((size_t)0) - 2))
435 if (strlen(src) != 2)
476 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{UNKNOWN}}
482 if (strlen(y) == 4)
488 if (strlen(y) == 3)
497 if (strlen(y) == 3)
503 if (strlen(y) == 4)
509 if (strlen(y) == 3)
517 // strncpy does not null-terminate, so we have no idea what the strlen is
519 clang_analyzer_eval(strlen(x) > 4); // expected-warning{{UNKNOWN}}
566 size_t orig_len = strlen(x);
569 if (strlen(y) != 4)
572 clang_analyzer_eval(strncat(x, y, strlen(y)) == x); // expected-warning{{TRUE}}
573 clang_analyzer_eval(strlen(x) == (orig_len + strlen(y))); // expected-warning{{TRUE}}
578 if (strlen(y) == 4)
579 strncat(x, y, strlen(y)); // expected-warning{{Size argument is greater than the free space in the destination buffer}}
584 if (strlen(y) == 3)
585 strncat(x, y, strlen(y)); // expected-warning{{Size argument is greater than the free space in the destination buffer}}
590 if (strlen(y) == 2)
591 strncat(x, y, strlen(y)); // expected-warning{{Size argument is greater than the free space in the destination buffer}}
596 if (strlen(y) == 4)
601 if (strlen(y) == 2)
602 strncat(x, y, strlen(y)); // no-warning
607 if (strlen(y) == 4)
613 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
619 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
628 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
635 // length for the "before" strlen, we won't be able to set one for "after".
642 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
643 clang_analyzer_eval(strlen(dst) == 4); // expected-warning{{UNKNOWN}}
651 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}}
652 clang_analyzer_eval(strlen(dst) == 4); // expected-warning{{UNKNOWN}}
656 if (strlen(dst) != (((size_t)0) - 2))
658 if (strlen(src) != 2)
1092 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{UNKNOWN}}
1098 if (strlen(y) >= 4)
1105 clang_analyzer_eval(strlen(x) <= 3); // expected-warning{{UNKNOWN}}