================ @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize=array-bounds -emit-llvm -o - %s | FileCheck %s + +// CodeGen does not use a function parameter's count yet: unlike a field's +// count, it bounds neither -fsanitize=array-bounds nor +// __builtin_dynamic_object_size. + +#define __counted_by(f) __attribute__((counted_by(f))) + +// CHECK-LABEL: define dso_local i32 @subscript( +// CHECK-NOT: __ubsan_handle_out_of_bounds +// CHECK: ret i32 +// +// FIXME: Check the index against the count. ---------------- delcypher wrote:
Rather than a standalone FIXME could you file a github issue and refer to it here? https://github.com/llvm/llvm-project/pull/234941 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
