1785624b2SCongcong Cai // RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ 2b777bb78SPiotr Zegar // RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays: true }}' 3b777bb78SPiotr Zegar 4b777bb78SPiotr Zegar const char name[] = "name"; 5b777bb78SPiotr Zegar const char array[] = {'n', 'a', 'm', 'e', '\0'}; 6*5fa742eeSCongcong Cai // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays] 7b777bb78SPiotr Zegar 8b777bb78SPiotr Zegar void takeCharArray(const char name[]); 9*5fa742eeSCongcong Cai // CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays, use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays] 10