| /llvm-project-15.0.7/llvm/test/tools/llvm-pdbutil/ |
| H A D | simple-padding-graphical.test | 21 ; NO_PADDING-NEXT: data +0x00 [sizeof=4] int X 22 ; NO_PADDING-NEXT: data +0x04 [sizeof=4] int Y 26 ; UNION-NEXT: data +0x00 [sizeof=4] int X 27 ; UNION-NEXT: data +0x00 [sizeof=8] __int64 Y 29 ; UNION-NEXT: data +0x00 [sizeof=4] int X 31 ; UNION-NEXT: data +0x08 [sizeof=8] __int64 Y 35 ; NESTED_UNION-NEXT: data +0x00 [sizeof=4] int X 71 ; EMPTY_BASE-NEXT: data +0x04 [sizeof=4] int X 75 ; VFPTR-NEXT: vfptr +0x00 [sizeof=4] 76 ; VFPTR-NEXT: data +0x04 [sizeof=4] int X [all …]
|
| H A D | complex-padding-graphical.test | 12 ; DIRECT_VB_ONLY: struct TestIVBBase [sizeof = 16] 14 ; DIRECT_VB_ONLY-NEXT: vbptr +0x00 [sizeof=4] 15 ; DIRECT_VB_ONLY-NEXT: data +0x04 [sizeof=4] int A 17 ; DIRECT_VB_ONLY-NEXT: vfptr +0x08 [sizeof=4] 27 DIRECT_VB_AND_NON_VB-NEXT: vbptr +0x08 [sizeof=4] 37 INDIRECT_VB-NEXT: vbptr +0x00 [sizeof=4] 38 INDIRECT_VB-NEXT: data +0x04 [sizeof=4] int A 39 INDIRECT_VB-NEXT: data +0x08 [sizeof=4] int B 40 INDIRECT_VB-NEXT: ivbase +0x0c [sizeof=8] TestVB 41 INDIRECT_VB-NEXT: vfptr +0x0c [sizeof=4] [all …]
|
| H A D | class-layout.test | 20 ; MEMBERS_TEST: class MembersTest::A [sizeof = 16] { 30 ; BASE_CLASS_A: class BaseClassTest::A [sizeof = 1] {} 33 ; BASE_CLASS_B: class BaseClassTest::B [sizeof = 4] 37 ; BASE_CLASS_C: class BaseClassTest::C [sizeof = 4] 41 ; BASE_CLASS_D: class BaseClassTest::D [sizeof = 8] 51 ; BITFIELD_TEST: struct BitFieldTest::A [sizeof = 8] { 52 ; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits1 : 1 53 ; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits2 : 2 54 ; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits3 : 3 55 ; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits4 : 4 [all …]
|
| H A D | symbol-filters.test | 62 ; SIZE_SORT_DATA: data {{.*}}sizeof=3{{.*}}char ThreeBytes[3] 63 ; SIZE_SORT_DATA: data {{.*}}sizeof=2{{.*}}char TwoBytes[2] 64 ; SIZE_SORT_DATA: data {{.*}}sizeof=1{{.*}}char OneByte 66 ; NAME_SORT_FUNCS: func {{.*}}sizeof= 40{{.*}}AFunc 67 ; NAME_SORT_FUNCS: func {{.*}}sizeof= 10{{.*}}BFunc 68 ; NAME_SORT_FUNCS: func {{.*}}sizeof= 14{{.*}}CFunc 70 ; NAME_SORT_FUNCS: func {{.*}}sizeof= 7{{.*}}main 72 ; SIZE_SORT_FUNCS: func {{.*}}sizeof= 40{{.*}}AFunc 74 ; SIZE_SORT_FUNCS: func {{.*}}sizeof= 14{{.*}}CFunc 75 ; SIZE_SORT_FUNCS: func {{.*}}sizeof= 10{{.*}}BFunc [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_common_interceptors_ioctl.inc | 51 _(FIOASYNC, READ, sizeof(int)); 54 _(FIONBIO, READ, sizeof(int)); 56 _(FIOSETOWN, READ, sizeof(int)); 60 _(SIOCSPGRP, READ, sizeof(int)); 65 _(TIOCGETD, WRITE, sizeof(int)); 68 _(TIOCMBIC, READ, sizeof(int)); 69 _(TIOCMBIS, READ, sizeof(int)); 71 _(TIOCMSET, READ, sizeof(int)); 75 _(TIOCPKT, READ, sizeof(int)); 77 _(TIOCSETD, READ, sizeof(int)); [all …]
|
| H A D | sanitizer_interceptors_ioctl_netbsd.inc | 427 _(KIOCTRANS, READ, sizeof(int)); 431 _(KIOCCMD, READ, sizeof(int)); 432 _(KIOCTYPE, WRITE, sizeof(int)); 436 _(KIOCSLED, READ, sizeof(char)); 972 _(DIOCLOCK, READ, sizeof(int)); 987 _(DIOCTUR, WRITE, sizeof(int)); 1025 _(FIONBIO, READ, sizeof(int)); 1026 _(FIOASYNC, READ, sizeof(int)); 1054 _(TIOCLBIS, READ, sizeof(int)); 1249 _(TIOCPKT, READ, sizeof(int)); [all …]
|
| H A D | sanitizer_common_interceptors_format.inc | 83 return sizeof(wchar_t); 88 return sizeof(wchar_t); 90 return sizeof(char); 115 return lengthModifier[1] == 'h' ? sizeof(char) : sizeof(short); 117 return lengthModifier[1] == 'l' ? sizeof(long long) : sizeof(long); 125 return sizeof(SIZE_T); 129 return sizeof(int); 145 return promote_float ? sizeof(double) : sizeof(float); 154 return sizeof(void *); 269 return sizeof(char *); [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
| H A D | sizeof-expression.rst | 3 bugprone-sizeof-expression 23 memset(buf, 0, sizeof(BUFLEN)); // sizeof(42) ==> sizeof(int) 49 // should be sizeof(float) or sizeof(double), depending on d.get_type() 84 memcpy(buf, kMessage, sizeof(kMessage)); // sizeof(char*) 101 Suspicious usage of 'sizeof(...)/sizeof(...)' 114 memcpy(dst, buf, sizeof(buf) / sizeof(int)); // sizeof(int) => 4 [incompatible sizes] 125 …return memcmp(OrderedValues, Values, sizeof(Values)) == 0; // sizeof(Values) ==> sizeof(char*) [i… 128 Suspicious 'sizeof' by 'sizeof' expression 139 memcpy(buf, kMessage, sizeof(kMessage) * sizeof(char)); // sizeof(kMessage) / sizeof(char) 153 Suspicious usage of 'sizeof(sizeof(...))' [all …]
|
| H A D | sizeof-container.rst | 1 .. title:: clang-tidy - bugprone-sizeof-container 3 bugprone-sizeof-container 6 The check finds usages of ``sizeof`` on expressions of STL container types. Most 18 …int a = 47 + sizeof(s); // warning: sizeof() doesn't return the size of the container. Did you mea… 20 int b = sizeof(std::string); // no warning, probably intended. 23 …int c = sizeof(array_of_strings) / sizeof(array_of_strings[0]); // no warning, definitely intended. 26 int d = sizeof(std_array); // no warning, probably intended.
|
| /llvm-project-15.0.7/llvm/test/DebugInfo/PDB/DIA/ |
| H A D | pdbdump-symbol-format.test | 35 ; TYPES_1: struct A [sizeof = 4] { 42 ; TYPES_2: struct MemberTest [sizeof = 96] { 44 ; TYPES_2: data +0x04 [sizeof=4] int m_typedef 45 ; TYPES_2: data +0x08 [sizeof=1] bool m_bool 46 ; TYPES_2: data +0x09 [sizeof=1] char m_char 47 ; TYPES_2: data +0x0a [sizeof=2] wchar_t m_wchar_t 48 ; TYPES_2: data +0x0c [sizeof=4] int m_int 50 ; TYPES_2: data +0x14 [sizeof=4] long m_long 53 ; TYPES_2: data +0x20 [sizeof=8] __int64 m_int64 55 ; TYPES_2: data +0x30 [sizeof=4] float m_float [all …]
|
| /llvm-project-15.0.7/lld/test/COFF/ |
| H A D | pdb-globals-dia-func-collision3.test | 43 CHECK-NEXT: func [0x000010d0+ 0 - 0x000010d1- 1 | sizeof= 1] (FPO) void __cdecl LuU() 45 CHECK-NEXT: func [0x000010b0+ 0 - 0x000010b1- 1 | sizeof= 1] (FPO) void __cdecl oet() 47 CHECK-NEXT: func [0x00001080+ 0 - 0x00001081- 1 | sizeof= 1] (FPO) void __cdecl OUV() 49 CHECK-NEXT: func [0x00001120+ 0 - 0x00001121- 1 | sizeof= 1] (FPO) void __cdecl pui() 51 CHECK-NEXT: func [0x00001090+ 0 - 0x00001091- 1 | sizeof= 1] (FPO) void __cdecl quH() 53 CHECK-NEXT: func [0x00001110+ 0 - 0x00001111- 1 | sizeof= 1] (FPO) void __cdecl sEH() 55 CHECK-NEXT: func [0x00001050+ 0 - 0x00001051- 1 | sizeof= 1] (FPO) void __cdecl teO() 57 CHECK-NEXT: func [0x00001030+ 0 - 0x00001031- 1 | sizeof= 1] (FPO) void __cdecl tEo() 59 CHECK-NEXT: func [0x000010c0+ 0 - 0x000010c1- 1 | sizeof= 1] (FPO) void __cdecl tuM() 61 CHECK-NEXT: func [0x00001040+ 0 - 0x00001041- 1 | sizeof= 1] (FPO) void __cdecl VUo() [all …]
|
| H A D | pdb-globals-dia-vfunc-collision.test | 33 CHECK: func [0x000010c0+ 0 - 0x000010dd-29 | sizeof= 29] (FPO) virtual {{.*}}A105() 34 CHECK: func [0x00001100+ 0 - 0x0000111b-27 | sizeof= 27] (FPO) virtual {{.*}}A307() 35 CHECK: func [0x000010e0+ 0 - 0x000010fd-29 | sizeof= 29] (FPO) virtual {{.*}}A206() 36 CHECK: func [0x00001120+ 0 - 0x0000113b-27 | sizeof= 27] (FPO) virtual {{.*}}A400() 39 CHECK: func [0x00001160+ 0 - 0x0000116c-12 | sizeof= 12] (FPO) virtual {{.*}}A307() 40 CHECK: func [0x00001170+ 0 - 0x0000117c-12 | sizeof= 12] (FPO) virtual {{.*}}A400() 41 CHECK: func [0x00001180+ 0 - 0x0000118c-12 | sizeof= 12] (FPO) virtual {{.*}}A206() 42 CHECK: func [0x00001190+ 0 - 0x0000119c-12 | sizeof= 12] (FPO) virtual {{.*}}A105()
|
| /llvm-project-15.0.7/llvm/test/DebugInfo/PDB/ |
| H A D | pdb-resolve-forward-refs.test | 10 ; CHECK: options: has unique name | scoped, sizeof 1 14 ; CHECK: options: has unique name | scoped, sizeof 1 22 ; CHECK: options: contains nested class | has unique name, sizeof 1 26 ; CHECK: options: has unique name | is nested, sizeof 1 30 ; CHECK: options: forward ref (-> 0x105C) | has unique name, sizeof 0 34 ; CHECK: options: has ctor / dtor | has unique name, sizeof 1 38 ; CHECK: options: has unique name, sizeof 1 42 ; CHECK: options: has unique name | sealed, sizeof 1 46 ; CHECK: options: forward ref (-> 0x1064) | has unique name, sizeof 0 50 ; CHECK: options: has unique name | overloaded operator, sizeof 1 [all …]
|
| /llvm-project-15.0.7/clang/test/CodeGenOpenCL/ |
| H A D | amdgpu-sizeof-alignof.cl | 46 check(sizeof(size_t) == PTSIZE); 48 check(sizeof(intptr_t) == PTSIZE); 55 check(sizeof(char) == 1); 57 check(sizeof(short) == 2); 59 check(sizeof(int) == 4); 61 check(sizeof(long) == 8); 64 check(sizeof(half) == 2); 67 check(sizeof(float) == 4); 70 check(sizeof(double) == 8); 73 check(sizeof(private void*) == 4); [all …]
|
| H A D | spirv_target.cl | 15 int res1[sizeof(my_st) == 12 ? 1 : -1]; // expected-no-diagnostics 16 int res2[sizeof(void *) == 4 ? 1 : -1]; // expected-no-diagnostics 17 int res3[sizeof(arg) == 4 ? 1 : -1]; // expected-no-diagnostics 19 int res1[sizeof(my_st) == 24 ? 1 : -1]; // expected-no-diagnostics 20 int res2[sizeof(void *) == 8 ? 1 : -1]; // expected-no-diagnostics 21 int res3[sizeof(arg) == 8 ? 1 : -1]; // expected-no-diagnostics
|
| /llvm-project-15.0.7/clang/test/SemaObjC/ |
| H A D | enum-fixed-type.m | 18 int array[sizeof(Enumeration) == sizeof(long)? 1 : -1]; function 38 int arr[(sizeof(__typeof__(Foo)) == sizeof(__typeof__(IntegerEnum)))? 1 : -1]; 39 int arr1[(sizeof(__typeof__(Foo)) == sizeof(__typeof__(long)))? 1 : -1]; 40 int arr2[(sizeof(__typeof__(IntegerEnum)) == sizeof(__typeof__(long)))? 1 : -1];
|
| H A D | warn-nontrivial-struct-memaccess.m | 27 memset(d, 0, sizeof(struct Trivial)); 28 bzero(d, sizeof(struct Trivial)); 29 memcpy(d, s, sizeof(struct Trivial)); 30 memmove(d, s, sizeof(struct Trivial)); 34 …memset(d, 0, sizeof(struct NonTrivial1)); // expected-warning {{that is not trivial to primitive-d… 35 memset((void *)d, 0, sizeof(struct NonTrivial1)); 36 …bzero(d, sizeof(struct NonTrivial1)); // expected-warning {{that is not trivial to primitive-defau… 37 …memcpy(d, s, sizeof(struct NonTrivial1)); // expected-warning {{that is not trivial to primitive-c… 38 …memmove(d, s, sizeof(struct NonTrivial1)); // expected-warning {{that is not trivial to primitive-…
|
| H A D | sizeof-interface.m | 6 int g0 = sizeof(I0); // expected-error{{invalid application of 'sizeof' to an incomplete type 'I0'}} function 26 int g1[ sizeof(I0) // expected-error {{application of 'sizeof' to interface 'I0' is not support… function 34 // sizeof). 35 int g2[ sizeof(I0) // expected-error {{application of 'sizeof' to interface 'I0' is not supported… function 50 // int g3[ sizeof(I1) == 0 ? 1 : -1]; 67 …unsigned long attributeRuns[1024 + sizeof(I)]; // expected-error {{application of 'sizeof' to inte… field
|
| /llvm-project-15.0.7/clang/test/Misc/ |
| H A D | languageOptsOpenCL.cl | 7 int v0[(sizeof(int) == 4) - 1]; 9 int v2[(sizeof(long) == 8) - 1]; 11 int v4[(sizeof(long long) == 16) - 1]; 13 int v6[(sizeof(float) == 4) - 1]; 16 int v8[(sizeof(double) == 8) - 1]; 19 int v10[(sizeof(half) == 2) - 1];
|
| /llvm-project-15.0.7/libcxx/include/ |
| H A D | bit | 110 if (sizeof(_Tp) <= sizeof(unsigned int)) 113 else if (sizeof(_Tp) <= sizeof(unsigned long)) 116 else if (sizeof(_Tp) <= sizeof(unsigned long long)) 164 if (sizeof(_Tp) <= sizeof(unsigned int)) 166 else if (sizeof(_Tp) <= sizeof(unsigned long)) 168 else if (sizeof(_Tp) <= sizeof(unsigned long long)) 188 if (sizeof(_Tp) <= sizeof(unsigned int)) 190 else if (sizeof(_Tp) <= sizeof(unsigned long)) 192 else if (sizeof(_Tp) <= sizeof(unsigned long long)) 227 if constexpr (sizeof(_Tp) >= sizeof(unsigned))
|
| H A D | __bits | 78 static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); 79 static_assert(sizeof(unsigned long) == 4, ""); 88 static_assert(sizeof(unsigned long) == sizeof(unsigned), ""); 111 static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); 112 static_assert(sizeof(unsigned long) == 4, ""); 121 static_assert(sizeof(unsigned) == sizeof(unsigned long), ""); 142 static_assert(sizeof(unsigned) == 4, ""); 147 static_assert(sizeof(unsigned long) == 4, ""); 152 static_assert(sizeof(unsigned long long) == 8, "");
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | MismatchedDeallocator-checker-test.mm | 7 typedef __typeof__(sizeof(int)) size_t; 23 int *p = (int *)malloc(sizeof(int)); 34 int *p = (int *)calloc(1, sizeof(int)); 44 int *p = (int *)my_malloc(sizeof(int)); 49 int *p = (int *)malloc(sizeof(int)); 54 int *p = (int *)malloc(sizeof(int)); 59 int *p = (int *)malloc(sizeof(int)); 152 int *p = (int *)malloc(sizeof(int)); 158 int *p = (int *)malloc(sizeof(int)); 164 int *p = (int *)malloc(sizeof(int)); [all …]
|
| H A D | NewDelete-intersections.mm | 21 typedef __typeof__(sizeof(int)) size_t; 27 int *p1 = (int *)malloc(sizeof(int)); 30 int *p2 = (int *)malloc(sizeof(int)); 34 int *p3 = (int *)malloc(sizeof(int)); // no warn 36 int *p4 = (int *)malloc(sizeof(int)); 40 int *p5 = (int *)alloca(sizeof(int)); 45 int *p1 = (int *)malloc(sizeof(int)); 49 int *p2 = (int *)__builtin_alloca(sizeof(int)); 74 NSData *nsdata = [NSData dataWithBytesNoCopy:p length:sizeof(int) freeWhenDone:1];
|
| /llvm-project-15.0.7/clang/test/Sema/ |
| H A D | invalid-bitwidth-expr.mm | 11 constexpr int s = sizeof(Ivar); 12 constexpr int ss = sizeof(X); 20 constexpr int sss = sizeof(Y); 34 constexpr int ssss = sizeof(Z); 37 int X : sizeof(_BitInt(invalid())); // expected-error {{use of undeclared identifier}} 39 constexpr int sssss = sizeof(Z2);
|
| /llvm-project-15.0.7/lldb/test/API/functionalities/postmortem/FreeBSDKernel/tools/ |
| H A D | libfbsdvmcore-hacks.patch | 112 - if (pread(kd->pmfd, &pdpe, sizeof(pdpe), ofs) != sizeof(pdpe)) { 113 + if (xpread(kd->pmfd, &pdpe, sizeof(pdpe), ofs) != sizeof(pdpe)) { 121 - if (pread(kd->pmfd, &pde, sizeof(pde), ofs) != sizeof(pde)) { 122 + if (xpread(kd->pmfd, &pde, sizeof(pde), ofs) != sizeof(pde)) { 130 - if (pread(kd->pmfd, &pte, sizeof(pte), ofs) != sizeof(pte)) { 131 + if (xpread(kd->pmfd, &pte, sizeof(pte), ofs) != sizeof(pte)) { 143 - if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != 145 sizeof(vmst->hdr)) { 156 - if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != 158 sizeof(vmst->hdr)) { [all …]
|