/llvm-project/clang/test/SemaCXX/ |
H A D | address-space-conversion.cpp | 80 (void)static_cast<B_ptr>(ap1); // expected-error{{casts away qualifiers}} in test_static_cast() 81 (void)static_cast<B_ptr>(ap2); // expected-error{{casts away qualifiers}} in test_static_cast() 82 (void)static_cast<B_ptr_1>(ap); // expected-error{{casts away qualifiers}} in test_static_cast() 83 (void)static_cast<B_ptr_1>(ap2); // expected-error{{casts away qualifiers}} in test_static_cast() 84 (void)static_cast<B_ptr_2>(ap); // expected-error{{casts away qualifiers}} in test_static_cast() 85 (void)static_cast<B_ptr_2>(ap1); // expected-error{{casts away qualifiers}} in test_static_cast() 94 (void)static_cast<A_ptr>(vp1); // expected-error{{casts away qualifiers}} in test_static_cast() 95 (void)static_cast<A_ptr>(vp2); // expected-error{{casts away qualifiers}} in test_static_cast() 96 (void)static_cast<A_ptr_1>(vp); // expected-error{{casts away qualifiers}} in test_static_cast() 97 (void)static_cast<A_ptr_1>(vp2); // expected-error{{casts away qualifiers}} in test_static_cast() [all …]
|
H A D | attr-arm-sve-vector-bits.cpp | 20 // Test implicit casts between VLA and VLS vectors 24 // Test implicit casts between GNU and VLA vectors 28 // Test implicit casts between GNU and VLS vectors 32 // Test implicit casts between VLA and VLS predicates 36 // Test implicit casts between GNU and VLA predicates
|
H A D | attr-riscv-rvv-vector-bits.cpp | 14 // Test implicit casts between VLA and VLS vectors 18 // Test implicit casts between GNU and VLA vectors 22 // Test implicit casts between GNU and VLS vectors
|
/llvm-project/clang/test/SemaObjCXX/ |
H A D | arc-type-conversion.mm | 71 …ected-error{{reinterpret_cast from '__strong id const *' to '__strong id *' casts away qualifiers}} 72 … expected-error{{reinterpret_cast from '__weak id const *' to '__weak id *' casts away qualifiers}} 73 …xpected-error{{reinterpret_cast from '__strong id const *' to '__weak id *' casts away qualifiers}} 74 …xpected-error{{reinterpret_cast from '__weak id const *' to '__strong id *' casts away qualifiers}} 79 // C-style casts aren't allowed to change Objective-C ownership 82 …)wip; // expected-error{{C-style cast from '__weak id *' to '__strong id *' casts away qualifiers}} 83 …// expected-error{{C-style cast from '__weak id const *' to '__strong id *' casts away qualifiers}} 84 …)sip; // expected-error{{C-style cast from '__strong id *' to '__weak id *' casts away qualifiers}} 85 …// expected-error{{C-style cast from '__strong id const *' to '__weak id *' casts away qualifiers}} 87 …// expected-error{{C-style cast from '__weak id *' to '__strong id const *' casts away qualifiers}} [all …]
|
/llvm-project/clang/test/CXX/expr/expr.post/expr.reinterpret.cast/ |
H A D | p2.cpp | 8 (void)reinterpret_cast<int * X::* Y::* *>(p); // expected-error {{casts away qualifiers}} in f() 10 (void)reinterpret_cast<float * X::* Y::* *>(p); // expected-error {{casts away qualifiers}} in f() 12 (void)reinterpret_cast<int * Y::* X::* *>(p); // expected-error {{casts away qualifiers}} in f() 15 (void)reinterpret_cast<double Y::* X::* * *>(p); // expected-warning {{casts away qualifiers}} in f() 18 …(void)reinterpret_cast<const volatile double Y::* X::* * *>(p); // expected-warning {{casts away q… in f() 19 …ast<const volatile double Y::*const X::*const **>(p); // expected-warning {{casts away qualifiers}} in f() 20 …ast<const volatile double Y::*const X::**const *>(p); // expected-warning {{casts away qualifiers}} in f() 21 …ast<const volatile double Y::*X::*const *const *>(p); // expected-warning {{casts away qualifiers}} in f() 24 …(void)reinterpret_cast<const double Y::*volatile X::**const *>(p); // expected-warning {{casts awa… in f()
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/google/ |
H A D | readability-casting.cpp | 18 …// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: C-style casts are discouraged; use static_cast (if nee… in f() 31 …// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: C-style casts are discouraged; use const_cast [google… in f() 221 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: C-style casts are discouraged; use static_cast [ in function_casts() 224 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: C-style casts are discouraged; use static_cast [ in function_casts() 227 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: C-style casts are discouraged; use static_cast [ in function_casts() 231 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: C-style casts are discouraged; use static_cast [ in function_casts() 234 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: C-style casts are discouraged; use static_cast [ in function_casts() 237 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: C-style casts are discouraged; use static_cast [ in function_casts() 241 // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: C-style casts are discouraged; use static_cast [ in function_casts() 244 // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: C-style casts are discouraged; use static_cast [ in function_casts() [all …]
|
/llvm-project/mlir/test/Integration/GPU/CUDA/sm90/ |
H A D | cga_cluster.mlir | 31 %cidX_i32 = index.casts %cidX : index to i32 32 %cidY_i32 = index.casts %cidY : index to i32 33 %cidZ_i32 = index.casts %cidZ : index to i32 34 %cdimX_i32 = index.casts %cdimX : index to i32 35 %cdimY_i32 = index.casts %cdimY : index to i32 36 %cdimZ_i32 = index.casts %cdimZ : index to i32 37 %bidX_i32 = index.casts %bidX : index to i32 38 %bidY_i32 = index.casts %bidY : index to i32 39 %bidZ_i32 = index.casts %bidZ : index to i32
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/readability/ |
H A D | redundant-casting.rst | 9 casts, and ``reinterpret_cast``. Its primary objective is to enhance code 21 functional casts, type-dependent casts, casts between distinct type aliases that 22 refer to the same underlying type, as well as bitfield-related casts and casts
|
/llvm-project/mlir/lib/Transforms/Utils/ |
H A D | OneToNTypeConversion.cpp | 71 // Casts block arguments in the target type back to the source type. (If in hasNonIdentityConversion() 75 // Casts other values in the target type back to the source type. (If in hasNonIdentityConversion() 79 // Casts values in the source type to the target type. (If necessary, this in hasNonIdentityConversion() 94 /// Attribute name that is used to annotate inserted unrealized casts with their 124 /// mapping and returns the results of these casts. If the conversion mapping of in buildUnrealizedCast() 127 /// Note that these unrealized casts are different from target materializations in buildUnrealizedCast() 130 /// only used in the places where the unrealized casts *don't* fold away. in buildUnrealizedCast() 164 /// Note that these unrealized casts are different from source materializations in buildUnrealizedForwardCasts() 167 /// only used in the places where the unrealized casts *don't* fold away. in buildUnrealizedForwardCasts() 225 // Create necessary casts i in replaceOp() [all...] |
/llvm-project/clang/test/SemaObjC/ |
H A D | illegal-nonarc-bridged-cast.m | 19 …ransfer id)CFCreateSomething(); // expected-warning {{'__bridge_transfer' casts have no effect whe… 20 …fer NSString*)CFCreateString(); // expected-warning {{'__bridge_transfer' casts have no effect whe… 27 …ed CFTypeRef)CreateSomething(); // expected-warning {{'__bridge_retained' casts have no effect whe… 28 …d CFStringRef)CreateNSString(); // expected-warning {{'__bridge_retained' casts have no effect whe… 38 #pragma clang diagnostic ignored "-Warc-bridge-casts-disallowed-in-nonarc"
|
/llvm-project/clang/test/Analysis/ |
H A D | symbolcast-floatingpoint.cpp | 2 // RUN: -analyzer-config support-symbolic-integer-casts=false \ 6 // RUN: -analyzer-config support-symbolic-integer-casts=true \ 21 // We should not see in the dump of the SVal any redundant casts like in test_no_redundant_floating_point_cast()
|
H A D | z3-refute-enum-crash.cpp | 8 // RUN: -analyzer-config support-symbolic-integer-casts=true -verify=symbolic %s 11 // RUN: -analyzer-config support-symbolic-integer-casts=false -verify %s 50 // Historically, the static analyzer did not emit symbolic casts in a lot in test_enum_types() 53 // serialization, it made up these 'missing' integral casts - for the in test_enum_types() 55 // However, it would still not emit the cast for missing explicit casts, in test_enum_types()
|
/llvm-project/mlir/test/Dialect/Index/ |
H A D | index-ops.mlir | 105 // CHECK-NEXT: index.casts %[[A]] : index to i64 106 %0 = index.casts %a : index to i64 107 // CHECK-NEXT: index.casts %[[B]] : i32 to index 108 %1 = index.casts %b : i32 to index 109 // CHECK-NEXT: index.casts %[[C]] : i64 to index 110 %2 = index.casts %c : i64 to index
|
/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
H A D | SwappedArgumentsCheck.cpp | 24 /// Look through lvalue to rvalue and nop casts. This filters out 26 /// other implicit casts. 35 /// Restrict the warning to implicit casts that are most likely 101 // implicit casts. in check() 106 // If the types that go into the implicit casts match the types of the other in check()
|
/llvm-project/clang/test/CodeGenCXX/ |
H A D | catch-implicit-integer-truncations.cpp | 39 // Explicit truncating casts. 70 // Explicit NOP casts. 101 // Explicit functional truncating casts. 137 // Explicit functional NOP casts. 168 // Explicit C++-style casts truncating casts. 199 // Explicit C++-style casts NOP casts.
|
H A D | catch-implicit-integer-sign-changes-true-negatives.cpp | 78 // Explicit functional sign-changing casts. 98 // Explicit functional NOP casts. 115 // Explicit C++-style sign-changing casts. 132 // Explicit C++-style casts NOP casts.
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
H A D | non-zero-enum-to-bool-conversion.rst | 6 Detect implicit and explicit casts of ``enum`` type into ``bool`` where ``enum`` 22 and flagging instances where implicit or explicit casts from enumeration types to 50 implicit/explicit casts to bool. It accepts a semicolon-separated list of
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/performance/ |
H A D | no-int-to-ptr.rst | 14 So while (integral) pointer to integer casts are effectively no-ops, 15 and are transparent to the optimizer, integer to (integral) pointer casts 28 …return (char*)aligned_intptr; // warning: avoid integer to pointer casts [performance-no-int-to-pt…
|
/llvm-project/clang-tools-extra/clang-tidy/modernize/ |
H A D | UseNullptrCheck.cpp | 33 /// Create a matcher that finds implicit casts as well as the head of a 34 /// sequence of zero or more nested explicit casts that have an implicit cast 36 /// Finding sequences of explicit casts is necessary so that an entire sequence 191 /// Looks for implicit casts as well as sequences of 0 or more explicit 192 /// casts with an implicit null-to-pointer cast within. 195 /// top-most explicit cast (i.e. it has no explicit casts as an ancestor) where in CastSequenceVisitor() 197 /// explicit casts exist between the found top-most explicit cast and the in CastSequenceVisitor() 250 // arg must be checked to result in NullTo(Member)Pointer casts. in VisitStmt() 297 /// result in \p CE, yield NullTo(Member)Pointer casts. in allArgUsesValid() 522 // of explicit casts tha [all...] |
/llvm-project/mlir/include/mlir/Bindings/Python/ |
H A D | PybindAdaptors.h | 66 /// Casts object <-> MlirAffineMap. 88 /// Casts object <-> MlirAttribute. 108 /// Casts object -> MlirBlock. 119 /// Casts object -> MlirContext. 139 /// Casts object <-> MlirDialectRegistry. 158 /// Casts object <-> MlirLocation. 183 /// Casts object <-> MlirModule. 202 /// Casts object <-> MlirFrozenRewritePatternSet. 223 /// Casts object <-> MlirOperation. 244 /// Casts objec [all...] |
/llvm-project/mlir/test/Integration/Dialect/Math/CPU/ |
H A D | mathtofuncs_ctlz.mlir | 7 // RUN: reconcile-unrealized-casts)" \ 23 // RUN: reconcile-unrealized-casts)" \ 40 // RUN: reconcile-unrealized-casts)" \
|
/llvm-project/clang/test/Sema/ |
H A D | cast.c | 62 // Test that casts to void* can be controlled separately in testInt() 163 // Test that casts to void* can be controlled separately in testVoidPtr() 177 // Test that casts to void* can be controlled separately in testCharPtr() 196 // Test that casts to void* can be controlled separately in voidPointerToEnumCast() 206 // Test that casts to void* can be controlled separately in pointerToEnumCast()
|
H A D | warn-bad-function-cast.c | 22 /* Casts to void types are always OK. */ in foo() 28 /* Casts to the same type or similar types are OK. */ in foo() 40 /* All following casts issue warning */ in foo()
|
/llvm-project/clang/test/CXX/expr/expr.const/ |
H A D | p5-26.cpp | 20 …(void)static_cast<T*>(b); // expected-error {{static_cast from 'const void *' to 'T *' casts away … in test() 21 …>(b); // expected-error {{static_cast from 'const void *' to 'volatile T *' casts away qualifiers}} in test() 25 …(void)static_cast<T*>(c); // expected-error{{static_cast from 'volatile void *' to 'T *' casts awa… in test()
|
/llvm-project/mlir/include/mlir/Dialect/Arith/Utils/ |
H A D | Utils.h | 56 /// Converts an OpFoldResult to a Value. Returns the fold result if it casts to 57 /// a Value or creates a ConstantOp if it casts to an Integer Attribute. 62 /// Converts an OpFoldResult to a Value. Returns the fold result if it casts to 63 /// a Value or creates a ConstantIndexOp if it casts to an Integer Attribute.
|