[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 1 00:42:08 PDT 2022
JonasToth added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-alignment.cpp:43
+ // of the `*`.
+ int *IPtr = &I;
+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: variable 'IPtr' of type 'int *' can be declared 'const'
----------------
could you please provide more test cases with pointers in combination with
- macros
- typedefs
- template parameters
- `auto *`
I think we should be thorough here. The users might not have all details of where `const` applies in their forehead and big transformations of code-bases should definitely not break the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131386/new/
https://reviews.llvm.org/D131386
More information about the cfe-commits
mailing list