This is an archive of the discontinued LLVM Phabricator instance.

Expand definition deprecation warning to include constexpr statements.
ClosedPublic

Authored by luken-google on May 30 2022, 9:18 AM.

Details

Summary

Clang currently warns on definitions downgraded to declarations
with a const modifier, but not for a constexpr modifier. This patch
updates the warning logic to warn on both inputs, and adds a test to
check the additional case as well.

See also: https://bugs.chromium.org/p/chromium/issues/detail?id=1284718

Diff Detail

Event Timeline

luken-google created this revision.May 30 2022, 9:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2022, 9:18 AM
luken-google requested review of this revision.May 30 2022, 9:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2022, 9:18 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hans added a subscriber: hans.

Looks reasonable to me. It would be good if Richard or Aaron could take a look too.

aaron.ballman accepted this revision.May 31 2022, 12:30 PM

LGTM, but please add a release note about the new diagnostic behavior.

Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution?

This revision is now accepted and ready to land.May 31 2022, 12:30 PM

Add release note.

Thanks for the review! I do need someone to commit on my behalf. Please commit with name "Luke Nihlen" and email address "luken@google.com".

Squash commit to include original changes.