[PATCH] D45444: [clang-tidy] implement new check for const-correctness
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 18 05:37:03 PST 2019
JonasToth added a comment.
Herald added a subscriber: mgehre.
In D45444#1685995 <https://reviews.llvm.org/D45444#1685995>, @tsdgeos wrote:
> Would this warn with stuff like
>
> double borderWidth;
> [... code that doesn't use borderWidth ...]
> borderWidth = border->getWidth();
> [... code that reads borderWidth ...]
>
>
Warn in what sense? That `borderWidth` could be initialized early and then be `const`?
No. It would only suggest `const` (if configured to make values `const`) when `borderWidth` is initialized and then untouched.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D45444/new/
https://reviews.llvm.org/D45444
More information about the cfe-commits
mailing list