Issue |
52895
|
Summary |
[clang-tidy] bugprone-reserved-identifier fix produces uncompilable code
|
Labels |
new issue
|
Assignees |
|
Reporter |
renanmoreira17
|
This line of code was written in a header file:
```cpp
#define _5_kmph_rpm 459
```
The check “bugprone-reserved-identifier” suggested the following fix:
```
warning: declaration uses identifier '_5_kmph_rpm', which is reserved in the global namespace [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp]
#define _5_kmph_rpm 459
^~~~~~~~~~~
5_kmph_rpm
```
However, this fix breaks compilation since the suggested `#define` identifier starts with a number.
Here’s my clang-tidy info:
> Homebrew LLVM version 13.0.0
Optimized build.
Default target: x86_64-apple-darwin20.6.0
Host CPU: broadwell
I’m on macOS 11.6.1 Big Sur.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs