Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 1060) sorted by relevance

12345678910>>...43

/llvm-project/compiler-rt/test/msan/Linux/
H A Dsyscalls.cpp24 char buf[1000] __attribute__((aligned(8))); in main() local
27 memset(buf, 0, sizeof(buf)); in main()
28 __msan_unpoison(buf, sizeof(buf)); in main()
29 __sanitizer_syscall_pre_recvmsg(0, buf, 0); in main()
30 __sanitizer_syscall_pre_rt_sigpending(buf, kTen); in main()
31 __sanitizer_syscall_pre_getdents(0, buf, kTen); in main()
32 __sanitizer_syscall_pre_getdents64(0, buf, kTen); in main()
34 __msan_unpoison(buf, sizeof(buf)); in main()
35 __sanitizer_syscall_post_recvmsg(0, 0, buf, 0); in main()
36 __sanitizer_syscall_post_rt_sigpending(-1, buf, kTen); in main()
[all …]
/llvm-project/clang/test/Sema/
H A Dwarn-format-overflow-truncation.c23 char buf[10]; in call_snprintf() local
24 __builtin_snprintf(buf, 10, "merp"); in call_snprintf()
25 …__builtin_snprintf(buf, 11, "merp"); // expected-warning {{'snprintf' size argument is too large; … in call_snprintf()
26 …__builtin_snprintf(buf, 12, "%#12x", n); // kprintf-warning {{'snprintf' will always be truncated;… in call_snprintf()
28 __builtin_snprintf(buf, 0, "merp"); in call_snprintf()
29 …__builtin_snprintf(buf, 3, "merp"); // kprintf-warning {{'snprintf' will always be truncated; spec… in call_snprintf()
30 …__builtin_snprintf(buf, 4, "merp"); // kprintf-warning {{'snprintf' will always be truncated; spec… in call_snprintf()
31 __builtin_snprintf(buf, 5, "merp"); in call_snprintf()
32 …__builtin_snprintf(buf, 1, "%.1000g", d); // kprintf-warning {{'snprintf' will always be truncated… in call_snprintf()
33 __builtin_snprintf(buf, 5, "%.1000g", d); in call_snprintf()
[all …]
H A Dwarn-fortify-source.c39 char buf[20]; in call_memcpy_type() local
40 …memcpy(&p.first, buf, 20); // expected-warning {{memcpy' will always overflow; destination buffer … in call_memcpy_type()
81 char buf[10]; in call_memset() local
82 __builtin_memset(buf, 0xff, 10); in call_memset()
83 …__builtin_memset(buf, 0xff, 11); // expected-warning {{'memset' will always overflow; destination … in call_memset()
87 char buf[10]; in call_snprintf() local
88 __builtin_snprintf(buf, 10, "merp"); in call_snprintf()
89 …__builtin_snprintf(buf, 11, "merp"); // expected-warning {{'snprintf' size argument is too large; … in call_snprintf()
90 __builtin_snprintf(buf, 0, "merp"); in call_snprintf()
91 …__builtin_snprintf(buf, 3, "merp"); // expected-warning {{'snprintf' will always be truncated; spe… in call_snprintf()
[all …]
/llvm-project/compiler-rt/lib/sanitizer_common/tests/
H A Dsanitizer_printf_test.cpp22 char buf[1024]; in TEST() local
24 buf, sizeof(buf), "a%db%zdc%ue%zuf%xh%zxq%pe%sr", (int)-1, (uptr)-2, in TEST()
26 EXPECT_EQ(len, strlen(buf)); in TEST()
31 EXPECT_STREQ(expectedString.c_str(), buf); in TEST()
35 char buf[] = "123456789"; in TEST() local
36 uptr len = internal_snprintf(buf, 4, "%s", "abcdef"); in TEST()
38 EXPECT_STREQ("abc", buf); in TEST()
39 EXPECT_EQ(buf[3], 0); in TEST()
40 EXPECT_EQ(buf[4], '5'); in TEST()
41 EXPECT_EQ(buf[5], '6'); in TEST()
[all …]
/llvm-project/llvm/unittests/ADT/
H A DSmallPtrSetTest.cpp24 int buf[8]; in TEST()
26 buf[i] = 0; in TEST()
28 SmallPtrSet<int *, 4> s1 = {&buf[0], &buf[1]}; in TEST()
30 (s2 = s1).insert(&buf[2]); in TEST()
33 (s2 = static_cast<SmallPtrSet<int *, 4> &>(s2)).insert(&buf[3]); in TEST()
39 EXPECT_TRUE(s1.count(&buf[i])); in TEST()
41 EXPECT_FALSE(s1.count(&buf[i])); in TEST()
45 (s2 = {&buf[6], &buf[ in TEST()
22 int buf[8]; TEST() local
53 int buf[8]; TEST() local
106 int buf[8]; TEST() local
169 int buf[10]; TEST() local
297 int buf[3]; TEST() local
335 int buf[4] = {0, 11, 22, 11}; TEST() local
[all...]
/llvm-project/clang/test/Analysis/
H A Dout-of-bounds-new.cpp7 int *buf = new int[100]; in test1() local
8 buf[100] = 1; // expected-warning{{Out of bound access to memory}} in test1()
12 int *buf = new int[100]; in test1_ok() local
13 buf[99] = 1; // no-warning in test1_ok()
21 int *buf = new int[100]; in test1_ptr() local
22 int *p = buf; in test1_ptr()
27 int *buf = new int[100]; in test1_ptr_ok() local
28 int *p = buf; in test1_ptr_ok()
37 int *buf = new int[100]; in test1_ptr_arith() local
38 int *p = buf; in test1_ptr_arith()
[all …]
H A Dout-of-bounds.c9 int buf[100]; in test1() local
10 buf[100] = 1; // expected-warning{{Out of bound access to memory}} in test1()
14 int buf[100]; in test1_ok() local
15 buf[99] = 1; // no-warning in test1_ok()
38 int buf[100]; in test1_ptr() local
39 int *p = buf; in test1_ptr()
44 int buf[100]; in test1_ptr_ok() local
45 int *p = buf; in test1_ptr_ok()
54 int buf[100]; in test1_ptr_arith() local
55 int *p = buf; in test1_ptr_arith()
[all …]
H A Dbsd-string.c21 char buf[5]; in f2() local
23 len = strlcpy(buf, "abcd", sizeof(buf)); // expected-no-warning in f2()
25 len = strlcat(buf, "efgh", sizeof(buf)); // expected-no-warning in f2()
44 char buf[8]; in f6() local
45 strlcpy(buf, "abc", 3); in f6()
46 size_t len = strlcat(buf, "defg", 4); in f6()
51 char buf[8]; in f7() local
52 return strlcpy(buf, "1234567", 0); // no-crash in f7()
56 char buf[5]; in f8() local
60 len = strlcpy(buf,"123", sizeof(buf)); in f8()
[all …]
H A Dmpichecker.cpp7 double buf = 0; in matchedWait1() local
11 MPI_Isend(&buf, 1, MPI_DOUBLE, rank + 1, 0, MPI_COMM_WORLD, &sendReq1); in matchedWait1()
12 MPI_Irecv(&buf, 1, MPI_DOUBLE, rank - 1, 0, MPI_COMM_WORLD, &recvReq1); in matchedWait1()
21 double buf = 0; in matchedWait2() local
25 MPI_Isend(&buf, 1, MPI_DOUBLE, rank + 1, 0, MPI_COMM_WORLD, &sendReq1); in matchedWait2()
26 MPI_Irecv(&buf, 1, MPI_DOUBLE, rank - 1, 0, MPI_COMM_WORLD, &recvReq1); in matchedWait2()
34 double buf = 0; in matchedWait3() local
38 MPI_Isend(&buf, 1, MPI_DOUBLE, rank + 1, 0, MPI_COMM_WORLD, &sendReq1); in matchedWait3()
39 MPI_Irecv(&buf, 1, MPI_DOUBLE, rank - 1, 0, MPI_COMM_WORLD, &recvReq1); in matchedWait3()
52 double buf = 0; in missingWait1() local
[all …]
H A Dcopy-elision.cpp132 T *buf[20]; member
138 buf[len] = t; in push()
182 clang_analyzer_eval(v.buf[0] == &c); // expected-warning{{TRUE}} in testMultipleReturns()
185 clang_analyzer_eval(v.buf[0] != v.buf[1]); // expected-warning{{TRUE}} in testMultipleReturns()
186 clang_analyzer_eval(v.buf[1] != v.buf[2]); // expected-warning{{TRUE}} in testMultipleReturns()
187 clang_analyzer_eval(v.buf[2] != v.buf[3]); // expected-warning{{TRUE}} in testMultipleReturns()
188 clang_analyzer_eval(v.buf[ in testMultipleReturns()
[all...]
H A Dundef-buffers.c12 char buf[2]; in stackBased1() local
13 buf[0] = 'a'; in stackBased1()
14 return buf[1]; // expected-warning{{Undefined}} in stackBased1()
18 char buf[2]; in stackBased2() local
19 buf[1] = 'a'; in stackBased2()
20 return buf[0]; // expected-warning{{Undefined}} in stackBased2()
25 char buf[2]; in stackBased3() local
27 buf[0] = 'a'; in stackBased3()
29 return buf[1]; // expected-warning{{Undefined}} in stackBased3()
31 return buf[0]; in stackBased3()
[all …]
H A Dstd-c-library-functions-arg-constraints.c171 void test_notnull_symbolic(FILE *fp, int *buf) { in test_notnull_symbolic() argument
172 fread(buf, sizeof(int), 10, fp); in test_notnull_symbolic()
173 clang_analyzer_eval(buf != 0); // \ in test_notnull_symbolic()
179 void test_notnull_symbolic2(FILE *fp, int *buf) { in test_notnull_symbolic2() argument
180 if (!buf) // bugpath-note{{Assuming 'buf' is null}} \ in test_notnull_symbolic2()
182 fread(buf, sizeof(int), 10, fp); // \ in test_notnull_symbolic2()
190 void test_notnull_buffer_1(void *buf) { in test_notnull_buffer_1() argument
191 __not_null_buffer(buf, 0, 1); in test_notnull_buffer_1()
192 clang_analyzer_eval(buf != 0); // \ in test_notnull_buffer_1()
203 void test_notnull_buffer_2(void *buf) { in test_notnull_buffer_2() argument
[all …]
/llvm-project/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/
H A Dranges_uninitialized_fill.pass.cpp51 Buffer<Counted, 1> buf; in main() local
53 std::ranges::uninitialized_fill(buf.begin(), buf.begin(), x); in main()
61 forward_iterator<Counted*> it(buf.begin()); in main()
77 Buffer<Counted, N> buf; in main() local
79 std::ranges::uninitialized_fill(buf.begin(), buf.end(), x); in main()
82 assert(std::all_of(buf.begin(), buf.end(), pred)); in main()
84 std::destroy(buf in main()
91 Buffer<Counted, N> buf; main() local
106 Buffer<Counted, 5> buf; main() local
120 Buffer<Counted, 5> buf; main() local
134 Buffer<Counted, 5> buf; main() local
168 Buffer<Counted, 5> buf; main() local
186 Buffer<Counted, 5> buf; main() local
204 Buffer<Counted, N> buf; main() local
218 Buffer<Counted, N> buf; main() local
[all...]
/llvm-project/lld/ELF/
H A DThunks.cpp63 void writeTo(uint8_t *buf) override;
71 virtual void writeLong(uint8_t *buf) = 0; in size()
89 void writeLong(uint8_t *buf) override;
103 void writeLong(uint8_t *buf) override;
118 void writeTo(uint8_t *buf) override;
122 void writeLong(uint8_t *buf);
140 void writeTo(uint8_t *buf) override;
148 virtual void writeLong(uint8_t *buf) = 0;
175 void writeTo(uint8_t *buf) override;
183 virtual void writeLong(uint8_t *buf)
523 writeTo(uint8_t * buf) writeTo() argument
535 writeLong(uint8_t * buf) writeLong() argument
560 writeLong(uint8_t * buf) writeLong() argument
602 writeTo(uint8_t * buf) writeTo() argument
645 writeTo(uint8_t * buf) writeTo() argument
669 writeLong(uint8_t * buf) writeLong() argument
684 writeLong(uint8_t * buf) writeLong() argument
701 writeLong(uint8_t * buf) writeLong() argument
719 writeLong(uint8_t * buf) writeLong() argument
739 writeLong(uint8_t * buf) writeLong() argument
761 writeLong(uint8_t * buf) writeLong() argument
789 writeLong(uint8_t * buf) writeLong() argument
813 writeLong(uint8_t * buf) writeLong() argument
827 writeLong(uint8_t * buf) writeLong() argument
842 writeLong(uint8_t * buf) writeLong() argument
859 writeLong(uint8_t * buf) writeLong() argument
877 writeLong(uint8_t * buf) writeLong() argument
895 writeLong(uint8_t * buf) writeLong() argument
912 writeLong(uint8_t * buf) writeLong() argument
932 writeLong(uint8_t * buf) writeLong() argument
954 writeTo(uint8_t * buf) writeTo() argument
965 writeTo(uint8_t * buf) writeTo() argument
987 writeTo(uint8_t * buf) writeTo() argument
1012 writeTo(uint8_t * buf) writeTo() argument
1035 writePPC32PltCallStub(uint8_t * buf,uint64_t gotPltVA,const InputFile * file,int64_t addend) writePPC32PltCallStub() argument
1071 writeTo(uint8_t * buf) writeTo() argument
1076 std::string buf; addSymbols() local
1099 writeTo(uint8_t * buf) writeTo() argument
1121 writePPC64LoadAndBranch(uint8_t * buf,int64_t offset) writePPC64LoadAndBranch() argument
1131 writeTo(uint8_t * buf) writeTo() argument
1150 writeTo(uint8_t * buf) writeTo() argument
1193 writeTo(uint8_t * buf) writeTo() argument
1235 writeTo(uint8_t * buf) writeTo() argument
[all...]
/llvm-project/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/
H A Dranges_uninitialized_default_construct.pass.cpp45 Buffer<Counted, 1> buf; in main() local
47 std::ranges::uninitialized_default_construct(buf.begin(), buf.begin()); in main()
55 forward_iterator<Counted*> it(buf.begin()); in main()
69 Buffer<Counted, 5> buf; in main() local
71 std::ranges::uninitialized_default_construct(buf.begin(), buf.end()); in main()
75 std::destroy(buf.begin(), buf.end()); in main()
82 Buffer<Counted, N> buf; in main() local
96 Buffer<Counted, 5> buf; main() local
110 Buffer<Counted, 5> buf; main() local
123 Buffer<Counted, 5> buf; main() local
138 Buffer<Counted, 5> buf; main() local
153 Buffer<Counted, 5> buf; main() local
169 Buffer<Counted, N> buf; main() local
181 Buffer<Counted, N> buf; main() local
[all...]
/llvm-project/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/
H A Dranges_uninitialized_value_construct.pass.cpp47 Buffer<Counted, 1> buf; in main() local
49 std::ranges::uninitialized_value_construct(buf.begin(), buf.begin()); in main()
57 forward_iterator<Counted*> it(buf.begin()); in main()
71 Buffer<Counted, N> buf; in main() local
73 std::ranges::uninitialized_value_construct(buf.begin(), buf.end()); in main()
77 std::destroy(buf.begin(), buf.end()); in main()
84 Buffer<Counted, N> buf; in main() local
98 Buffer<Counted, 5> buf; main() local
111 Buffer<Counted, 5> buf; main() local
124 Buffer<Counted, 5> buf; main() local
156 Buffer<Counted, 5> buf; main() local
172 Buffer<Counted, 5> buf; main() local
189 Buffer<Counted, N> buf; main() local
201 Buffer<Counted, N> buf; main() local
[all...]
/llvm-project/lld/ELF/Arch/
H A DX86.cpp29 int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override;
30 void writeGotPltHeader(uint8_t *buf) const override;
32 void writeGotPlt(uint8_t *buf, const Symbol &s) const override;
33 void writeIgotPlt(uint8_t *buf, const Symbol &s) const override;
34 void writePltHeader(uint8_t *buf) const override;
35 void writePlt(uint8_t *buf, const Symbol &sym,
41 void relocateAlloc(InputSectionBase &sec, uint8_t *buf) const override;
172 void X86::writeGotPltHeader(uint8_t *buf) const { in writeGotPlt()
173 write32le(buf, ctx.mainPart->dynamic->getVA()); in writeGotPlt()
176 void X86::writeGotPlt(uint8_t *buf, cons argument
170 writeGotPlt(uint8_t * buf,const Symbol & s) const writeGotPlt() argument
211 writePlt(uint8_t * buf,const Symbol & sym,uint64_t pltEntryAddr) const writePlt() argument
236 getImplicitAddend(const uint8_t * buf,RelType type) const getImplicitAddend() argument
533 writeGotPlt(uint8_t * buf,const Symbol & s) const writeGotPlt() argument
539 writePlt(uint8_t * buf,const Symbol & sym,uint64_t) const writePlt() argument
561 writeIBTPlt(uint8_t * buf,size_t numEntries) const writeIBTPlt() argument
606 writeGotPlt(uint8_t * buf,const Symbol & s) const writeGotPlt() argument
631 writePlt(uint8_t * buf,const Symbol & sym,uint64_t pltEntryAddr) const writePlt() argument
660 writeGotPlt(uint8_t * buf,const Symbol & s) const writeGotPlt() argument
690 writePlt(uint8_t * buf,const Symbol & sym,uint64_t pltEntryAddr) const writePlt() argument
[all...]
H A DMips.cpp30 int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override;
32 void writeGotPlt(uint8_t *buf, const Symbol &s) const override;
33 void writePltHeader(uint8_t *buf) const override;
34 void writePlt(uint8_t *buf, const Symbol &sym,
207 void MIPS<ELFT>::writeGotPlt(uint8_t *buf, const Symbol &) const { in writeGotPlt() argument
211 write32(ctx, buf, va); in writeGotPlt()
259 template <class ELFT> void MIPS<ELFT>::writePltHeader(uint8_t *buf) const { in writePltHeader()
264 memset(buf, 0, pltHeaderSize); in writePltHeader()
266 write16(ctx, buf, in writePltHeader()
268 write16(ctx, buf in writePltHeader()
320 writePlt(uint8_t * buf,const Symbol & sym,uint64_t pltEntryAddr) const writePlt() argument
382 getImplicitAddend(const uint8_t * buf,RelType type) const getImplicitAddend() argument
[all...]
/llvm-project/libcxx/test/std/ranges/range.adaptors/range.reverse/
H A Dadaptor.pass.cpp24 int buf[] = {1, 2, 3}; in test() local
29 BidirRange view(buf, buf + 3); in test()
32 assert(result.begin_ == buf); in test()
33 assert(result.end_ == buf + 3); in test()
37 BidirRange view(buf, buf + 3); in test()
39 assert(result.begin_ == buf); in test()
40 assert(result.end_ == buf + 3); in test()
54 BidirRange view(buf, buf + 3); in test()
57 assert(base(result.begin()) == buf); in test()
58 assert(base(result.end()) == buf + 3); in test()
[all …]
/llvm-project/libc/src/setjmp/riscv/
H A Dsetjmp.cpp30 LLVM_LIBC_FUNCTION(int, setjmp, (jmp_buf buf)) {
31 STORE(ra, buf->__pc);
32 STORE(s0, buf->__regs[0]);
33 STORE(s1, buf->__regs[1]);
34 STORE(s2, buf->__regs[2]);
35 STORE(s3, buf->__regs[3]);
36 STORE(s4, buf->__regs[4]);
37 STORE(s5, buf->__regs[5]);
38 STORE(s6, buf->__regs[6]);
39 STORE(s7, buf
[all...]
H A Dlongjmp.cpp31 LLVM_LIBC_FUNCTION(void, longjmp, (jmp_buf buf, int val)) {
32 LOAD(ra, buf->__pc);
33 LOAD(s0, buf->__regs[0]);
34 LOAD(s1, buf->__regs[1]);
35 LOAD(s2, buf->__regs[2]);
36 LOAD(s3, buf->__regs[3]);
37 LOAD(s4, buf->__regs[4]);
38 LOAD(s5, buf->__regs[5]);
39 LOAD(s6, buf->__regs[6]);
40 LOAD(s7, buf
[all...]
/llvm-project/openmp/runtime/src/
H A Dkmp_utility.cpp61 struct kmp_cpuid buf; in __kmp_query_cpuid() local
71 __kmp_x86_cpuid(0, 0, &buf); in __kmp_query_cpuid()
75 buf.eax, buf.ebx, buf.ecx, buf.edx)); in __kmp_query_cpuid()
77 max_arg = buf.eax; in __kmp_query_cpuid()
85 __kmp_x86_cpuid(1, 0, &buf); in __kmp_query_cpuid()
88 1, buf.eax, buf.ebx, buf.ecx, buf.edx)); in __kmp_query_cpuid()
93 p->signature = buf.eax; in __kmp_query_cpuid()
94 p->family = get_value(buf.eax, 20, 0xff) + get_value(buf.eax, 8, 0x0f); in __kmp_query_cpuid()
96 (get_value(buf.eax, 16, 0x0f) << 4) + get_value(buf.eax, 4, 0x0f); in __kmp_query_cpuid()
97 p->stepping = get_value(buf.eax, 0, 0x0f); in __kmp_query_cpuid()
[all …]
/llvm-project/clang/test/SemaCXX/
H A Dbuiltin-object-size-cxx14.cpp42 void copy5CharsInto(char *buf) // expected-note{{candidate}}
43 __attribute__((enable_if(__builtin_object_size(buf, 0) != -1 &&
44 __builtin_object_size(buf, 0) > 5,
49 void copy5CharsIntoStrict(char *buf) // expected-note{{candidate}}
50 __attribute__((enable_if(__builtin_object_size(buf, 1) != -1 &&
51 __builtin_object_size(buf, 1) > 5,
56 char buf[6]; member
62 char buf[5]; member
67 char buf[6]; in noWriteToBuf() local
68 copy5CharsInto(buf); in noWriteToBuf()
[all …]
/llvm-project/llvm/test/Transforms/Mem2Reg/
H A Dpreserve-nonnull-load-metadata.ll17 %buf = alloca ptr
19 store ptr %arg.load, ptr %buf, align 8
20 %buf.load = load ptr, ptr %buf, !nonnull !0, !noundef !0
21 ret ptr %buf.load
31 %buf = alloca ptr
33 store ptr %arg.load, ptr %buf, align 8
34 %buf.load = load ptr, ptr %buf, !nonnull !0
35 ret ptr %buf.load
49 %buf = alloca ptr
51 store ptr null, ptr %buf, align 8
[all …]
/llvm-project/libc/test/src/sys/statvfs/linux/
H A Dstatvfs_test.cpp21 struct statvfs buf; in TEST()
23 ASSERT_THAT(LIBC_NAMESPACE::statvfs("/", &buf), Succeeds()); in TEST()
27 struct statvfs buf;
29 ASSERT_THAT(LIBC_NAMESPACE::statvfs("", &buf), Fails(ENOENT)); in TEST() local
43 ASSERT_THAT(LIBC_NAMESPACE::statvfs(TEST_DIR, &buf), Succeeds()); in TEST()
47 ASSERT_THAT(LIBC_NAMESPACE::statvfs(TEST_DIR, &buf), Fails(ENOENT)); in TEST()
9 statfs(const char * path,struct statfs * buf) statfs() argument
20 struct statfs buf; TEST() local
38 struct statvfs buf; TEST() local

12345678910>>...43