diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 98da81041c36..2de0975b1570 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -123,17 +123,17 @@ Improvements to clang-tidy Flags function parameters of a pointer type that could be changed to point to a constant type instead. +- New `readability-redundant-declaration + `_ check + + Finds redundant variable and function declarations. + - New `readability-redundant-member-init `_ check Flags member initializations that are unnecessary because the same default constructor would be called if they were not present. -- New `readability-redundant-declaration - `_ check - - Warns about duplicate variable declarations. - Fixed bugs: - `modernize-make-unique diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-declaration.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-declaration.rst index 032feb4b31b2..4b5d0a5d6e05 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-declaration.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-declaration.rst @@ -21,7 +21,9 @@ They can for instance be unintentional left overs from previous refactorings when code has been moved around. Having redundant declarations could in worst case mean that there are typos in the code that cause bugs. -Normally the code can be automatically fixed, clang-tidy can remove the second -declaration. However there are 2 cases when you need to fix the code manually: - * When the declarations are in different header files. - * When multiple variables are declared together. +Normally the code can be automatically fixed, :program:`clang-tidy` can remove +the second declaration. However there are 2 cases when you need to fix the code +manually: + +* When the declarations are in different header files; +* When multiple variables are declared together.