| /llvm-project-15.0.7/clang/test/Sema/ |
| H A D | format-strings-scanf.c | 47 scanf("%%"); // no-warning in test() 48 scanf("%%%1$d", i); // no-warning in test() 49 scanf("%1$d%%", i); // no-warning in test() 53 scanf("%*d%1$d", i); // no-warning in test() 65 scanf("%ls", ws); // no-warning in bad_length_modifiers() 124 scanf("%ms", sp); // No warning. in test_alloc_extension() 126 scanf("%mc", sp); // No warning. in test_alloc_extension() 141 scanf("%qd", llx); // no-warning in test_quad() 183 scanf("%d", vip); // No warning. in test_qualifiers() 184 scanf("%n", vip); // No warning. in test_qualifiers() [all …]
|
| H A D | format-strings-fixit.c | 123 scanf("%lf", str); in test2() 124 scanf("%lf", vstr); in test2() 125 scanf("%ls", str); in test2() 126 scanf("%ls", str); in test2() 131 scanf("%p", &intVar); in test2() 132 scanf("%f", intAVar); in test2() 138 scanf("%f", &longVar); in test2() 145 scanf("%f", &sizeVar); in test2() 163 scanf("%o", &longVar); in test2() 164 scanf("%u", &longVar); in test2() [all …]
|
| H A D | warn-fortify-scanf.c | 4 extern int scanf(const char *format, ...); 14 scanf("%4s %5s %9s", buf20, buf30, buf10); in call_scanf() 17 scanf("%19s %5s %9s", buf20, buf30, buf10); in call_scanf() 18 scanf("%19s %29s %9s", buf20, buf30, buf10); in call_scanf() 21 scanf("%*21s %5s", buf10); in call_scanf() 23 scanf("%9s %*30s", buf10); in call_scanf() 27 scanf("%4[a] %5[a] %9[a]", buf20, buf30, buf10); in call_scanf() 33 scanf("%4c %5c %10c", buf20, buf30, buf10); in call_scanf() 35 scanf("%4c %5c %9c", buf20, buf30, buf10); in call_scanf() 36 scanf("%20c %5c %9c", buf20, buf30, buf10); in call_scanf() [all …]
|
| H A D | format-strings-ms.c | 5 int scanf(const char * restrict, ...) ; 44 scanf("%wc", &c); in w_test() 45 scanf("%wC", &c); in w_test() 46 scanf("%C", &c); in w_test() 47 scanf("%ws", s); in w_test() 48 scanf("%wS", s); in w_test() 49 scanf("%S", s); in w_test() 73 …scanf("%hc", &bad); // expected-warning{{format specifies type 'char *' but the argument has type … in h_test() 74 …scanf("%hC", &bad); // expected-warning{{format specifies type 'char *' but the argument has type … in h_test() 75 …scanf("%hs", &bad); // expected-warning{{format specifies type 'char *' but the argument has type … in h_test() [all …]
|
| H A D | format-strings-c90.c | 4 int scanf(const char * restrict, ...); 8 scanf("%as", sp); /* expected-warning{{'a' length modifier is not supported by ISO C}} */ in foo() 9 scanf("%a[abc]", sp); /* expected-warning{{'a' length modifier is not supported by ISO C}} */ in foo() 12 scanf("%a", fp); in foo() 13 scanf("%afoobar", fp); in foo() 20 scanf("%da", ip); in foo() 23 …scanf("%as", fp); /* expected-warning{{format specifies type 'char **' but the argument has type '… in foo() 25 …scanf("%aS", fp); /* expected-warning{{format specifies type 'wchar_t **' (aka 'int **') but the a… in foo() 28 …scanf("%a[abc]", fp); /* expected-warning{{format specifies type 'char **' but the argument has ty… in foo()
|
| H A D | format-strings-int-typedefs.c | 4 int scanf(char const *, ...); 16 scanf("%jd", 0); // expected-warning {{format specifies type 'intmax_t *' (aka 'long long *')}} in test() 17 …scanf("%ju", 0); // expected-warning {{format specifies type 'uintmax_t *' (aka 'unsigned long lon… in test() 18 scanf("%zu", 0); // expected-warning {{format specifies type 'size_t *' (aka 'unsigned long *')}} in test() 19 scanf("%td", 0); // expected-warning {{format specifies type 'ptrdiff_t *' (aka 'int *')}} in test() 20 scanf("%lc", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test() 21 scanf("%ls", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test() 22 scanf("%S", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test() 23 scanf("%C", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
|
| H A D | format-strings-gnu.c | 10 int scanf(const char * restrict, ...) ; 51 scanf("%Ld", y); // no-warning in scanf_longlong() 52 scanf("%Lu", y); // no-warning in scanf_longlong() 53 scanf("%Lx", y); // no-warning in scanf_longlong() 54 scanf("%Ld", x); // no-warning in scanf_longlong() 55 scanf("%Lu", x); // no-warning in scanf_longlong() 56 scanf("%Lx", x); // no-warning in scanf_longlong() 57 …scanf("%Ls", "hello"); // expected-warning {{length modifier 'L' results in undefined behavior or … in scanf_longlong()
|
| H A D | format-strings-darwin.c | 11 int scanf(const char * restrict, ...) ; 57 …scanf("%hD", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf() 58 …scanf("%lD", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf() 59 …scanf("%hU", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf() 60 …scanf("%lU", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf() 61 …scanf("%hO", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf() 62 …scanf("%lO", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
|
| H A D | format-strings-enum.c | 14 EXTERN_C int scanf(const char *, ...); 47 …scanf("%c", fwd); // expected-warning{{format specifies type 'char *' but the argument has type 'e… in forward_enum() 48 scanf("%u", fwd); in forward_enum() 49 …scanf("%lu", fwd); // expected-warning{{format specifies type 'unsigned long *' but the argument h… in forward_enum() 50 …scanf("%p", fwd); // expected-warning{{format specifies type 'void **' but the argument has type '… in forward_enum()
|
| H A D | format-strings-non-iso.c | 4 int scanf(const char * restrict, ...); 11 …scanf("%qd", (long long *)0); // expected-warning{{'q' length modifier is not supported by ISO C}}… in f() 14 scanf("%ms", &cp); // expected-warning{{'m' length modifier is not supported by ISO C}} in f()
|
| H A D | format-strings-no-fixit.c | 11 int scanf(char const *, ...); 37 scanf(kFormat6, i); in pr9751() 38 scanf("%00d", i); in pr9751()
|
| H A D | format-strings-fixit-ssize_t.c | 12 int scanf(const char *, ...); 18 scanf("%f", &s); in test()
|
| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/cert/ |
| H A D | err34-c.c | 40 scanf("%jd", &im); in f1() 57 scanf("%hhd", &c); in f1() 59 scanf("%hd", &s); in f1() 61 scanf("%zu", &st); in f1() 63 scanf("%td", &pt); in f1() 65 scanf("%o", ui); in f1() 67 scanf("%X", ui); in f1() 69 scanf("%x", ui); in f1() 91 scanf("%d%u%f", &i, &u, &f); in f3() 95 scanf("%s%d", str, &i); in f3() [all …]
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | taint-generic.c | 121 scanf("%d", &n); in bufferScanfDirect() 127 scanf("%d", &n); in bufferScanfArithmetic1() 134 scanf("%d", &n); in bufferScanfArithmetic2() 141 scanf("%d", &n); in bufferScanfAssignment() 329 scanf("%d", &x); in testDivByZero() 336 scanf("%d", &x); in testTaintedVLASize() 363 scanf("%d", &i); in SymSymExprWithDiffTypes() 371 scanf("%d", &i); in constraintManagerShouldTreatAsOpaque() 700 scanf("%9s", s); in testStrchrnul() 709 scanf("%9s", s); in testIndex() [all …]
|
| H A D | taint-diagnostic-visitor.c | 5 int scanf(const char *restrict format, ...); 11 scanf("%s", buf); // expected-note {{Taint originated here}} in taintDiagnostic() 18 scanf("%d", &index); // expected-note {{Taint originated here}} in taintDiagnosticOutOfBound() 24 scanf("%d", &operand); // expected-note {{Value assigned to 'operand'}} in taintDiagnosticDivZero() 32 scanf("%d", &x); // expected-note {{Value assigned to 'x'}} in taintDiagnosticVLA()
|
| H A D | taint-generic.cpp | 6 int scanf(const char*, ...); 16 void scanf(const char*, ...); 39 myNamespace::scanf("%d", &x); in testConfigurationNamespacePropagation1() 42 scanf("%d", &x); in testConfigurationNamespacePropagation1() 114 void scanf(const char*, int*); 121 foo.scanf("%d", &x); in testConfigurationMemberFunc()
|
| H A D | taint-tester.c | 17 scanf("%d", &n); in taintTracking() 31 scanf("%p", &ptr); in taintTracking() 43 scanf("%p", &xyPtr); in taintTracking() 51 scanf("%d", &xy.y); in taintTracking() 52 scanf("%d", &xy.x); in taintTracking() 57 scanf("%d %d", &xy.y, &xy.x); in taintTracking() 66 scanf("%d", &x); in BitwiseOp() 181 scanf("%s", s); in atoiTest()
|
| H A D | debug-exprinspection-istainted.c | 6 int scanf(const char *restrict format, ...); 15 scanf("%s", buf); in foo() 24 scanf("%s", buf); in exactly_one_argument_required()
|
| H A D | global_region_invalidation.mm | 81 scanf("%d", &tmp); 89 scanf("%d", &tmp); 97 scanf("%d", &i); 103 scanf("%d", &i); 113 scanf("%d", &tmp); 121 scanf("%d", &tmp); 128 scanf("%d", &i); 134 scanf("%d", &i);
|
| H A D | bool-assignment.c | 108 int scanf(const char *format, ...); 111 scanf("%d", &n); in test_tainted_Boolean()
|
| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | format-strings-0x.cpp | 4 extern int scanf(const char *restrict, ...); 9 …scanf("%as", sp); // expected-warning{{format specifies type 'float *' but the argument has type '… in f() 12 …scanf("%p", sp); // expected-warning{{format specifies type 'void **' but the argument has type '… in f() 15 scanf("%afoobar", fp); in f()
|
| H A D | format-strings.cpp | 8 extern int scanf(const char *restrict, ...); 14 scanf("%as", sp); in f() 22 scanf("%afoobar", fp); in f() 34 int scanf(const char *, ...) __attribute__((format(scanf, 2, 3))); 44 foo.scanf("%d"); // expected-warning{{more '%' conversions than data arguments}} in h()
|
| H A D | format-strings-0x-nopedantic.cpp | 4 extern int scanf(const char *restrict, ...);
|
| /llvm-project-15.0.7/clang/test/SemaObjC/ |
| H A D | format-strings-utf8.m | 10 int scanf(const char * restrict, ...); function 40 scanf("%\u25B9", a); 41 scanf("%\xE2\x96\xB9", a); 42 scanf("%\U00010348", a); 43 scanf("%\xF0\x90\x8D\x88", a); 44 scanf("%\xe2", a);
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Windows/ |
| H A D | shadow_mapping_failure.cpp | 11 scanf("%s", bigchunk); in main()
|