This is an archive of the discontinued LLVM Phabricator instance.

Adds -Wfree-nonheap-object to -Wmost
ClosedPublic

Authored by cjdb on Jan 7 2021, 3:12 PM.

Details

Summary

We'd discussed adding the warning to -Wall in D89988. This patch honours that.

Diff Detail

Event Timeline

cjdb requested review of this revision.Jan 7 2021, 3:12 PM
cjdb created this revision.
aaron.ballman added inline comments.Jan 8 2021, 6:32 AM
clang/include/clang/Basic/DiagnosticSemaKinds.td
7624

Would it make more sense to remove the DefaultIgnore rather than explicitly adding the diagnostic group to -Wmost?

aaron.ballman edited subscribers, added: cfe-commits; removed: Restricted Project.Jan 8 2021, 6:33 AM
cjdb updated this revision to Diff 315470.Jan 8 2021, 11:35 AM
cjdb updated this revision to Diff 315471.Jan 8 2021, 11:37 AM
cjdb marked an inline comment as done.
aaron.ballman accepted this revision.Jan 8 2021, 12:22 PM

LGTM! We may want to file a bug report for the static analyzer to not duplicate the diagnostics from the frontend now that this is no longer ignored by default.

This revision is now accepted and ready to land.Jan 8 2021, 12:22 PM

Can you mention this new warning in release notes?

https://clang.llvm.org/docs/ReleaseNotes.html