Home
last modified time | relevance | path

Searched refs:scanf (Results 1 – 25 of 62) sorted by relevance

123

/llvm-project-15.0.7/clang/test/Sema/
H A Dformat-strings-scanf.c47 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 Dformat-strings-fixit.c123 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 Dwarn-fortify-scanf.c4 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 Dformat-strings-ms.c5 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()
73scanf("%hc", &bad); // expected-warning{{format specifies type 'char *' but the argument has type … in h_test()
74scanf("%hC", &bad); // expected-warning{{format specifies type 'char *' but the argument has type … in h_test()
75scanf("%hs", &bad); // expected-warning{{format specifies type 'char *' but the argument has type … in h_test()
[all …]
H A Dformat-strings-c90.c4 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()
23scanf("%as", fp); /* expected-warning{{format specifies type 'char **' but the argument has type '… in foo()
25scanf("%aS", fp); /* expected-warning{{format specifies type 'wchar_t **' (aka 'int **') but the a… in foo()
28scanf("%a[abc]", fp); /* expected-warning{{format specifies type 'char **' but the argument has ty… in foo()
H A Dformat-strings-int-typedefs.c4 int scanf(char const *, ...);
16 scanf("%jd", 0); // expected-warning {{format specifies type 'intmax_t *' (aka 'long long *')}} in test()
17scanf("%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 Dformat-strings-gnu.c10 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()
57scanf("%Ls", "hello"); // expected-warning {{length modifier 'L' results in undefined behavior or … in scanf_longlong()
H A Dformat-strings-darwin.c11 int scanf(const char * restrict, ...) ;
57scanf("%hD", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
58scanf("%lD", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
59scanf("%hU", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
60scanf("%lU", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
61scanf("%hO", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
62scanf("%lO", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
H A Dformat-strings-enum.c14 EXTERN_C int scanf(const char *, ...);
47scanf("%c", fwd); // expected-warning{{format specifies type 'char *' but the argument has type 'e… in forward_enum()
48 scanf("%u", fwd); in forward_enum()
49scanf("%lu", fwd); // expected-warning{{format specifies type 'unsigned long *' but the argument h… in forward_enum()
50scanf("%p", fwd); // expected-warning{{format specifies type 'void **' but the argument has type '… in forward_enum()
H A Dformat-strings-non-iso.c4 int scanf(const char * restrict, ...);
11scanf("%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 Dformat-strings-no-fixit.c11 int scanf(char const *, ...);
37 scanf(kFormat6, i); in pr9751()
38 scanf("%00d", i); in pr9751()
H A Dformat-strings-fixit-ssize_t.c12 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 Derr34-c.c40 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 Dtaint-generic.c121 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 Dtaint-diagnostic-visitor.c5 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 Dtaint-generic.cpp6 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 Dtaint-tester.c17 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 Ddebug-exprinspection-istainted.c6 int scanf(const char *restrict format, ...);
15 scanf("%s", buf); in foo()
24 scanf("%s", buf); in exactly_one_argument_required()
H A Dglobal_region_invalidation.mm81 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 Dbool-assignment.c108 int scanf(const char *format, ...);
111 scanf("%d", &n); in test_tainted_Boolean()
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dformat-strings-0x.cpp4 extern int scanf(const char *restrict, ...);
9scanf("%as", sp); // expected-warning{{format specifies type 'float *' but the argument has type '… in f()
12scanf("%p", sp); // expected-warning{{format specifies type 'void **' but the argument has type '… in f()
15 scanf("%afoobar", fp); in f()
H A Dformat-strings.cpp8 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 Dformat-strings-0x-nopedantic.cpp4 extern int scanf(const char *restrict, ...);
/llvm-project-15.0.7/clang/test/SemaObjC/
H A Dformat-strings-utf8.m10 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 Dshadow_mapping_failure.cpp11 scanf("%s", bigchunk); in main()

123