Lines Matching refs:strlen
38 #define strlen BUILTIN(strlen) macro
39 size_t strlen(const char *s);
42 clang_analyzer_eval(strlen("123") == 3); // expected-warning{{TRUE}} in strlen_constant0()
47 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{TRUE}} in strlen_constant1()
52 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{TRUE}} in strlen_constant2()
55 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{UNKNOWN}} in strlen_constant2()
59 return strlen(0); // expected-warning{{Null pointer argument in call to string length function}} in strlen_null()
63 …return strlen((char*)&strlen_fn); // expected-warning{{Argument to string length function is the a… in strlen_fn()
68 …return strlen((char*)&&label); // expected-warning{{Argument to string length function is the addr… in strlen_nonloc()
78 size_t a = strlen(z.a); in strlen_subregion()
80 size_t b = strlen(z.a); in strlen_subregion()
86 size_t c = strlen(z.a); in strlen_subregion()
93 size_t a = strlen(x); in strlen_argument()
94 size_t b = strlen(x); in strlen_argument()
100 size_t c = strlen(x); in strlen_argument()
107 size_t a = strlen(global_str); in strlen_global()
108 size_t b = strlen(global_str); in strlen_global()
112 clang_analyzer_eval(strlen(global_str) == 0); // expected-warning{{TRUE}} in strlen_global()
118 size_t c = strlen(global_str); in strlen_global()
124 size_t a = strlen(x); in strlen_indirect()
127 size_t b = strlen(x); in strlen_indirect()
134 size_t c = strlen(x); in strlen_indirect()
140 size_t a = strlen(x); in strlen_indirect2()
146 size_t c = strlen(x); in strlen_indirect2()
152 if (strlen(x) < 5) in strlen_liveness()
154 clang_analyzer_eval(strlen(x) < 5); // expected-warning{{FALSE}} in strlen_liveness()
225 clang_analyzer_eval(strnlen(x, 10) == strlen(x)); // expected-warning{{UNKNOWN}} in strnlen_is_not_strlen()
289 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{TRUE}} in strcpy_effects()
296 if (strlen(y) == 4) in strcpy_overflow()
302 if (strlen(y) == 3) in strcpy_no_overflow()
328 clang_analyzer_eval(stpcpy(x, y) == &x[strlen(y)]); // expected-warning{{TRUE}} in stpcpy_effect()
329 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{TRUE}} in stpcpy_effect()
335 if (strlen(y) == 4) in stpcpy_overflow()
341 if (strlen(y) == 3) in stpcpy_no_overflow()
378 size_t orig_len = strlen(x); in strcat_effects()
381 if (strlen(y) != 4) in strcat_effects()
385 clang_analyzer_eval((int)strlen(x) == (orig_len + strlen(y))); // expected-warning{{TRUE}} in strcat_effects()
390 if (strlen(y) == 4) in strcat_overflow_0()
396 if (strlen(y) == 3) in strcat_overflow_1()
402 if (strlen(y) == 2) in strcat_overflow_2()
408 if (strlen(y) == 2) in strcat_no_overflow()
414 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strcat_symbolic_dst_length()
420 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strcat_symbolic_dst_length_taint()
426 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strcat_unknown_src_length()
434 if (strlen(dst) != (((size_t)0) - 2)) in strcat_too_big()
436 if (strlen(src) != 2) in strcat_too_big()
477 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{UNKNOWN}} in strncpy_effects()
483 if (strlen(y) == 4) in strncpy_overflow()
489 if (strlen(y) == 3) in strncpy_no_overflow()
498 if (strlen(y) == 3) in strncpy_no_overflow2()
504 if (strlen(y) == 4) in strncpy_truncate()
510 if (strlen(y) == 3) in strncpy_no_truncate()
520 clang_analyzer_eval(strlen(x) > 4); // expected-warning{{UNKNOWN}} in strncpy_exactly_matching_buffer()
567 size_t orig_len = strlen(x); in strncat_effects()
570 if (strlen(y) != 4) in strncat_effects()
573 clang_analyzer_eval(strncat(x, y, strlen(y)) == x); // expected-warning{{TRUE}} in strncat_effects()
574 clang_analyzer_eval(strlen(x) == (orig_len + strlen(y))); // expected-warning{{TRUE}} in strncat_effects()
579 if (strlen(y) == 4) in strncat_overflow_0()
580 …strncat(x, y, strlen(y)); // expected-warning{{Size argument is greater than the free space in the… in strncat_overflow_0()
585 if (strlen(y) == 3) in strncat_overflow_1()
586 …strncat(x, y, strlen(y)); // expected-warning{{Size argument is greater than the free space in the… in strncat_overflow_1()
591 if (strlen(y) == 2) in strncat_overflow_2()
592 …strncat(x, y, strlen(y)); // expected-warning{{Size argument is greater than the free space in the… in strncat_overflow_2()
597 if (strlen(y) == 4) in strncat_overflow_3()
602 if (strlen(y) == 2) in strncat_no_overflow_1()
603 strncat(x, y, strlen(y)); // no-warning in strncat_no_overflow_1()
608 if (strlen(y) == 4) in strncat_no_overflow_2()
614 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_symbolic_dst_length()
620 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_symbolic_src_length()
629 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_unknown_src_length()
643 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_symbolic_limit()
644 clang_analyzer_eval(strlen(dst) == 4); // expected-warning{{UNKNOWN}} in strncat_symbolic_limit()
652 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_unknown_limit()
653 clang_analyzer_eval(strlen(dst) == 4); // expected-warning{{UNKNOWN}} in strncat_unknown_limit()
658 if (strlen(dst) != (((size_t)0) - 2)) in strncat_too_big()
660 if (strlen(src) != 2) in strncat_too_big()
1156 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{UNKNOWN}} in strcat_symbolic_src_length()
1162 if (strlen(y) >= 4) in strncpy_exactly_matching_buffer2()
1169 clang_analyzer_eval(strlen(x) <= 3); // expected-warning{{UNKNOWN}} in strncpy_exactly_matching_buffer2()