HomePhabricator

[clang] Add -Wsuggest-override

Authored by logan-5 on Jul 12 2020, 3:38 PM.

Description

[clang] Add -Wsuggest-override

This patch adds -Wsuggest-override, which allows for more aggressive enforcement of modern C++ best practices, as well as better compatibility with gcc, which has had its own -Wsuggest-override since version 5.1.

Clang already has -Winconsistent-missing-override, which only warns in the case where there is at least one function already marked override in a class. This warning strengthens that warning by suggesting the override keyword regardless of whether it is already present anywhere.

The text between suggest-override and inconsistent-missing-override is now shared, using TextSubstitution for the entire diagnostic text.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D82728

Details

Committed
dblaikieJul 12 2020, 4:05 PM
Reviewer
dblaikie
Differential Revision
D82728: [clang] Add -Wsuggest-override
Parents
rGc73f425f84ad: [Attributor] Add AAValueSimplifyCallSiteArgument::manifest
Branches
Unknown
Tags
Unknown