| /llvm-project-15.0.7/clang/test/Sema/ |
| H A D | warn-char-subscripts.c | 5 char subscript = 0; in t1() local 11 char subscript = 0; in t2() local 17 char subscript = 0; in t3() local 23 char subscript = 0; in t4() local 35 signed char subscript = 0; in t6() local 41 unsigned char subscript = 0; in t7() local 42 int val = array[subscript]; // no warning for unsigned char in t7() 48 CharTy subscript = 0; in t8() local 55 SignedCharTy subscript = 0; in t9() local 62 UnsignedCharTy subscript = 0; in t10() local [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Windows/ |
| H A D | intercept_strdup.cpp | 10 int subscript = 1; in main() local 11 ptr[subscript] = '3'; in main() 16 subscript = -1; in main() 17 ptr[subscript] = 42; in main()
|
| H A D | stack_array_right_oob.cpp | 7 int subscript = 42; in main() local 9 buffer[subscript] = 42; in main()
|
| H A D | stack_array_left_oob.cpp | 7 int subscript = -1; in main() local 9 buffer[subscript] = 42; in main()
|
| H A D | stack_array_sanity.cpp | 7 int subscript = 1; in main() local 9 buffer[subscript] = 42; in main()
|
| H A D | dll_noreturn.cpp | 8 int subscript = -1; in noreturn_f() local 10 buffer[subscript] = 42; in noreturn_f()
|
| H A D | thread_stack_array_left_oob.cpp | 7 int subscript = -1; in thread_proc() local 9 stack_buffer[subscript] = 42; in thread_proc()
|
| H A D | thread_stack_array_right_oob.cpp | 7 int subscript = 42; in thread_proc() local 9 stack_buffer[subscript] = 42; in thread_proc()
|
| H A D | dll_thread_stack_array_left_oob.cpp | 9 int subscript = -1; in thread_proc() local 11 stack_buffer[subscript] = 42; in thread_proc()
|
| H A D | queue_user_work_item_report.cpp | 9 int subscript = -1; in work_item() local 11 stack_buffer[subscript] = 42; in work_item()
|
| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | warn-char-subscripts.cpp | 6 T subscript = 0; in t1() local 7 int val = array[subscript]; // expected-warning{{array subscript is of type 'char'}} in t1() 13 T subscript = 0; in t2() local 14 int val = subscript[array]; // expected-warning{{array subscript is of type 'char'}} in t2()
|
| /llvm-project-15.0.7/flang/include/flang/Runtime/ |
| H A D | descriptor.h | 218 offset += SubscriptByteOffset(j, subscript[j]); in SubscriptsToByteOffset() 229 return OffsetElement<A>(SubscriptsToByteOffset(subscript)); in Element() 240 int GetLowerBounds(SubscriptValue subscript[]) const { in GetLowerBounds() argument 242 subscript[j] = GetDimension(j).LowerBound(); in GetLowerBounds() 247 int GetShape(SubscriptValue subscript[]) const { in GetShape() argument 249 subscript[j] = GetDimension(j).Extent(); in GetShape() 262 if (subscript[k]++ < dim.UpperBound()) { 265 subscript[k] = dim.LowerBound(); 274 bool SubscriptsForZeroBasedElementNumber(SubscriptValue subscript[], 296 subscript[k] = quotient + dim.LowerBound(); [all …]
|
| /llvm-project-15.0.7/flang/lib/Lower/ |
| H A D | VectorSubscripts.cpp | 137 subscript.u); in gen() 139 if (llvm::any_of(arrayRef.subscript(), isTripletOrVector)) in gen() 146 for (const Fortran::evaluate::Subscript &subscript : arrayRef.subscript()) { in gen() local 149 subscript.u); in gen() 167 for (const auto &subscript : llvm::enumerate(arrayRef.subscript())) { in genRankedArrayRefSubscriptAndBase() local 207 subscript.value().u); in genRankedArrayRefSubscriptAndBase() 328 for (const LoweredSubscript &subscript : loweredSubscripts) in createSlice() local 346 subscript); in createSlice() 360 if (std::holds_alternative<mlir::Value>(subscript)) in genLoopBounds() 391 for (const LoweredSubscript &subscript : loweredSubscripts) in getElementAt() local [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/readability/ |
| H A D | simplify-subscript-expr.rst | 1 .. title:: clang-tidy - readability-simplify-subscript-expr 3 readability-simplify-subscript-expr 6 This check simplifies subscript expressions. Currently this covers calling 7 ``.data()`` and immediately doing an array subscript operation to obtain a
|
| /llvm-project-15.0.7/flang/lib/Evaluate/ |
| H A D | fold.cpp | 123 Subscript FoldOperation(FoldingContext &context, Subscript &&subscript) { in FoldOperation() argument 134 std::move(subscript.u)); in FoldOperation() 139 for (Subscript &subscript : arrayRef.subscript()) { in FoldOperation() 140 subscript = FoldOperation(context, std::move(subscript)); in FoldOperation() 142 return ArrayRef{std::move(base), std::move(arrayRef.subscript())}; in FoldOperation() 146 std::vector<Subscript> subscript; in FoldOperation() local 147 for (Subscript x : coarrayRef.subscript()) { in FoldOperation() 148 subscript.emplace_back(FoldOperation(context, std::move(x))); in FoldOperation() 154 CoarrayRef folded{std::move(coarrayRef.base()), std::move(subscript), in FoldOperation()
|
| H A D | check-expression.cpp | 564 return (*this)(x.subscript()); in operator ()() 728 } else if (auto rank{CheckSubscripts(x.subscript())}) { in operator ()() 743 return CheckSubscripts(x.subscript()).has_value(); in operator ()() 769 const std::vector<Subscript> &subscript) { in CheckSubscripts() argument 772 for (auto j{subscript.size()}; j-- > 0;) { in CheckSubscripts() 773 if (const auto *triplet{std::get_if<Triplet>(&subscript[j].u)}) { in CheckSubscripts() 785 } else if (anyTriplet || subscript[j].Rank() > 0) { in CheckSubscripts()
|
| /llvm-project-15.0.7/clang/test/SemaObjC/ |
| H A D | attr-swift_name.m | 116 float Point3DGetComponent(Point3D point, unsigned index) SWIFT_NAME("getter:Point3D.subscript(self:… 123 // expected-warning@-1 {{'__swift_name__' attribute for 'subscript' setter must have a 'newValue:' … 125 float Point3DSubscriptButNotGetterSetter(Point3D point, unsigned x) SWIFT_NAME("Point3D.subscript(s… 126 // expected-warning@-1 {{'__swift_name__' attribute for 'subscript' must be a getter or setter}} 129 // expected-warning@-1 {{'__swift_name__' attribute for 'subscript' setter cannot have multiple 'ne… 132 // expected-warning@-1 {{'__swift_name__' attribute for 'subscript' getter cannot have a 'newValue:… 137 float Point3DStaticSubscript(unsigned x) SWIFT_NAME("getter:Point3D.subscript(_:)"); 138 // expected-warning@-1 {{'__swift_name__' attribute for 'subscript' must have a 'self:' parameter}} 140 float Point3DStaticSubscriptNoArgs(void) SWIFT_NAME("getter:Point3D.subscript()"); 141 // expected-warning@-1 {{'__swift_name__' attribute for 'subscript' must have at least one paramete… [all …]
|
| H A D | arc-dict-bridged-cast.m | 31 …ameKey] = 0; // expected-error {{indexing expression is invalid because subscript type 'CFStringRe… 32 …*)0), 100)]; // expected-error {{indexing expression is invalid because subscript type 'CFMutableS…
|
| H A D | objc-container-subscripting-2.m | 19 …array[f] = array; // expected-error {{indexing expression is invalid because subscript type 'float… 20 …return array[3.14]; // expected-error {{indexing expression is invalid because subscript type 'dou…
|
| /llvm-project-15.0.7/polly/test/ScopDetectionDiagnostics/ |
| H A D | ReportMultipleNonAffineAccesses.ll | 25 ; CHECK-NEXT: remark: /tmp/test.c:4:16: The array subscript of "A" is not affine 29 ; ALL-NEXT: remark: /tmp/test.c:4:16: The array subscript of "A" is not affine 30 ; ALL-NEXT: remark: /tmp/test.c:5:16: The array subscript of "A" is not affine 32 ; ALL-NEXT: remark: /tmp/test.c:7:16: The array subscript of "B" is not affine 33 ; ALL-NEXT: remark: /tmp/test.c:8:16: The array subscript of "B" is not affine 34 ; ALL-NEXT: remark: /tmp/test.c:9:16: The array subscript of "B" is not affine 36 ; ALL-NEXT: remark: /tmp/test.c:11:16: The array subscript of "B" is not affine 37 ; ALL-NEXT: remark: /tmp/test.c:13:5: The array subscript of "A" is not affine 41 ; DELIN-NEXT: remark: /tmp/test.c:4:16: The array subscript of "A" is not affine 45 ; DELIN-ALL-NEXT: remark: /tmp/test.c:4:16: The array subscript of "A" is not affine [all …]
|
| /llvm-project-15.0.7/flang/runtime/ |
| H A D | descriptor.cpp | 167 SubscriptValue *subscript, const int *permutation) const { in DecrementSubscripts() argument 171 if (--subscript[k] >= dim.LowerBound()) { in DecrementSubscripts() 174 subscript[k] = dim.UpperBound(); in DecrementSubscripts() 180 const SubscriptValue *subscript, const int *permutation) const { in ZeroBasedElementNumber() argument 186 result += coefficient * (subscript[k] - dim.LowerBound()); in ZeroBasedElementNumber()
|
| /llvm-project-15.0.7/flang/lib/Semantics/ |
| H A D | resolve-names-utils.cpp | 535 for (const auto &subscript : elem.value().subscripts) { in CheckDataRef() local 548 subscript.u); in CheckDataRef() 644 auto subscript{evaluate::ToInt64(*expr)}; in CheckArrayBound() local 645 if (!subscript) { in CheckArrayBound() 651 currObject_.subscripts.push_back(*subscript); in CheckArrayBound() 662 auto subscript{evaluate::ToInt64(*expr)}; in CheckSubstringBound() local 663 if (!subscript) { in CheckSubstringBound() 671 if (*subscript < (start ? *start : 1)) { in CheckSubstringBound() 676 } else if (*subscript != 1) { in CheckSubstringBound() 677 currObject_.substringStart = *subscript; in CheckSubstringBound()
|
| /llvm-project-15.0.7/clang/test/SemaObjCXX/ |
| H A D | objc-container-subscripting.mm | 35 …base[index] = obj; // expected-error {{indexing expression is invalid because subscript type 'doub… 36 …obj = base[index]; // expected-error {{indexing expression is invalid because subscript type 'doub… 75 …ed-error {{type 'ExplicitlyConvertibleTo<NSMutableArray *>' does not provide a subscript operator}} 136 …return array[w]; // expected-error {{indexing expression is invalid because subscript type 'WeirdI…
|
| /llvm-project-15.0.7/polly/test/ScopInfo/ |
| H A D | multidim_only_ivs_3d_reverse.ll | 5 ; loop ivs appear in the array subscript does not follow the order of the 52 %subscript = add i64 %subscript2, %k 53 %idx = getelementptr inbounds double, double* %A, i64 %subscript
|
| /llvm-project-15.0.7/clang/docs/ |
| H A D | ObjectiveCLiterals.rst | 348 Objective-C supports two kinds of subscript expressions: *array-style* 349 subscript expressions use integer typed subscripts; *dictionary-style* 350 subscript expressions use Objective-C object pointer typed subscripts. 351 Each type of subscript expression is mapped to a message send using a 361 When the subscript operand has an integral type, the expression is 416 When the subscript operand has an Objective-C object pointer type, the 420 subscript operand, as in the following example: 434 subscript: 454 An Objective-C subscript expression occurs when the base operand of the 455 C subscript operator has an Objective-C object pointer type. Since this [all …]
|