diff options
author | Changqing Jing <changqing.jing@bmw.com> | 2025-10-09 10:44:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-09 02:44:53 +0000 |
commit | 72fe2d2ca10184fa4fd2c5fe863ab3458c666e14 (patch) | |
tree | 810cf20474740e893850dddab9bc7cbdb5ffa5fc /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 066ee516d5a6dcfa34b21280dcdfdc138e310409 (diff) | |
download | llvm-72fe2d2ca10184fa4fd2c5fe863ab3458c666e14.zip llvm-72fe2d2ca10184fa4fd2c5fe863ab3458c666e14.tar.gz llvm-72fe2d2ca10184fa4fd2c5fe863ab3458c666e14.tar.bz2 |
[clang-tidy]misc-const-correctness fix fake positive of function pointer (#162079)
Fix clang-tidy misc-const-correctness of function pointer, because
function pointer can't be declared as `const*const`
```
void function_pointer_basic() {
void (*const fp)() = nullptr;
fp();
}
test.cpp:2:3: warning: pointee of variable 'fp' of type 'void (*const)()' can be declared 'const' [misc-const-correctness]
2 | void (*const fp)() = nullptr;
| ^
| const
```
---------
Co-authored-by: Congcong Cai <congcongcai0907@163.com>
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions