Page MenuHomePhabricator

[clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness
Needs ReviewPublic

Authored by JonasToth on Nov 27 2018, 4:04 AM.

Details

Summary

This patch connects the check for const-correctness with the new general
utility to add const to variables.
The code-transformation is only done, if the detected variable for const-ness
is not part of a group-declaration.

This patch (in combination with readability-isolate-declaration) shows some
false positives of the ExprMutAnalyzer that should be addressed, as they
result in wrong code-transformation.

Event Timeline

JonasToth created this revision.Nov 27 2018, 4:04 AM
Eugene.Zelenko added inline comments.
clang-tidy/utils/LexerUtils.h
43

{} could returned instead.

docs/ReleaseNotes.rst
245

Merge artifact.

docs/clang-tidy/checks/cppcoreguidelines-const-correctness.rst
7

Will be good idea to synchronize first statement with Release Notes.

Eugene.Zelenko added a project: Restricted Project.Nov 27 2018, 2:24 PM

avoid bitrot

  • accidentally wrong patch uploaded