brintos

brintos / llvm-project-archived public Read only

0
0
Text · 876 B · 7c99f70 Raw
20 lines · cpp
1// Specify `-std=c++20` to run test only once becuase test expects changes2// in the header file so it fails if runs multiple times with different3// `-std` flags as check_clang_tidy doesn by default.4//5// RUN: rm -rf %t.dir6// RUN: mkdir -p %t.dir7// RUN: cp -r %S/Inputs/identifier-naming/symlink %t.dir/symlink8// RUN: mkdir -p %t.dir/symlink/build9// RUN: ln -s %t.dir/symlink/include/test.h %t.dir/symlink/build/test.h10// RUN: %check_clang_tidy -std=c++20 %s readability-identifier-naming %t.dir -- --header-filter="test.h" --config-file=%S/Inputs/identifier-naming/symlink/include/.clang-tidy -- -I %t.dir/symlink/build11// UNSUPPORTED: system-windows12 13#include "test.h"14 15int foo() {16    return global_const;17    // CHECK-MESSAGES: warning: invalid case style for global constant 'global_const' [readability-identifier-naming]18    // CHECK-FIXES: return kGlobalConst;19}20