| 1 |
// Specify `-std=c++20` to run test only once becuase test expects changes |
| 2 |
// in the header file so it fails if runs multiple times with different |
| 3 |
// `-std` flags as check_clang_tidy doesn by default. |
| 4 |
// |
| 5 |
// RUN: rm -rf %T/symlink |
| 6 |
// RUN: cp -r %S/Inputs/identifier-naming/symlink %T/symlink |
| 7 |
// RUN: mkdir -p %T/symlink/build |
| 8 |
// RUN: ln -s %T/symlink/include/test.h %T/symlink/build/test.h |
| 9 |
// RUN: %check_clang_tidy -std=c++20 %s readability-identifier-naming %t -- --header-filter="test.h" --config-file=%S/Inputs/identifier-naming/symlink/include/.clang-tidy -- -I %T/symlink/build |
| 10 |
// UNSUPPORTED: system-windows |
| 11 |
|
| 12 |
#include "test.h" |
| 13 |
|
| 14 |
int foo() { |
| 15 |
return global_const; |
| 16 |
// CHECK-MESSAGES: warning: invalid case style for global constant 'global_const' [readability-identifier-naming] |
| 17 |
// CHECK-FIXES: return kGlobalConst; |
| 18 |
} |