bolt/deps/llvm-18.1.8/clang-tools-extra/test/clang-tidy/checkers/bugprone/reserved-identifier-c.c
2025-02-14 19:21:04 +01:00

10 lines
390 B
C

// RUN: %check_clang_tidy %s bugprone-reserved-identifier %t
// in C, double underscores are fine except at the beginning
void foo__(void);
void f__o__o(void);
void f_________oo(void);
void __foo(void);
// CHECK-MESSAGES: :[[@LINE-1]]:6: warning: declaration uses identifier '__foo', which is a reserved identifier [bugprone-reserved-identifier]
// CHECK-FIXES: {{^}}void foo(void);{{$}}