1 // RUN: %check_clang_tidy -std=c++98-or-later %s cppcoreguidelines-pro-bounds-constant-array-index %t 2 3 // Note: this test expects no diagnostics, but FileCheck cannot handle that, 4 // hence the use of | count 0. 5 template <int index> struct B { getB6 int get() { 7 // The next line used to crash the check (in C++03 mode only). 8 return x[index]; 9 // CHECK-FIXES: return x[index]; 10 } 11 int x[3]; 12 }; 13