brintos

brintos / llvm-project-archived public Read only

0
0
Text · 457 B · c9391e3 Raw
12 lines · cpp
1// RUN: %check_clang_tidy -std=c++20 %s modernize-avoid-c-arrays %t2 3void f1(int data[], int size) {4  // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: do not declare C-style arrays, use 'std::span' instead5  int f4[] = {1, 2};6  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not declare C-style arrays, use 'std::array' instead7}8 9void f2(int data[100]) {10  // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: do not declare C-style arrays, use 'std::array' instead11}12