brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 32e6759 Raw
48 lines · cpp
1// RUN: %check_clang_tidy %s readability-identifier-naming %t -- \2// RUN:   -config="{CheckOptions: { \3// RUN:     readability-identifier-naming.ParameterCase: CamelCase, \4// RUN:     readability-identifier-naming.ParameterIgnoredRegexp: '^[a-z]{1,2}$', \5// RUN:     readability-identifier-naming.ClassCase: CamelCase, \6// RUN:     readability-identifier-naming.ClassIgnoredRegexp: '^fo$|^fooo$', \7// RUN:     readability-identifier-naming.StructCase: CamelCase, \8// RUN:     readability-identifier-naming.StructIgnoredRegexp: 'sooo|so|soo|$invalidregex[' \9// RUN:  }}"10 11int testFunc(int a, char **b);12int testFunc(int ab, char **ba);13int testFunc(int abc, char **cba);14// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for parameter 'abc'15// CHECK-MESSAGES: :[[@LINE-2]]:30: warning: invalid case style for parameter 'cba'16// CHECK-FIXES: int testFunc(int Abc, char **Cba);17int testFunc(int dE, char **eD);18// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for parameter 'dE'19// CHECK-MESSAGES: :[[@LINE-2]]:29: warning: invalid case style for parameter 'eD'20// CHECK-FIXES: int testFunc(int DE, char **ED);21int testFunc(int Abc, char **Cba);22 23class fo {24};25 26class fofo {27  // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'fofo'28  // CHECK-FIXES: class Fofo {29};30 31class foo {32  // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'foo'33  // CHECK-FIXES: class Foo {34};35 36class fooo {37};38 39class afooo {40  // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'afooo'41  // CHECK-FIXES: class Afooo {42};43 44struct soo {45  // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for struct 'soo'46  // CHECK-FIXES: struct Soo {47};48