This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add fix-it note to defaulted-function-deleted warning
ClosedPublic

Authored by njames93 on Sep 23 2022, 9:33 AM.

Details

Summary

Adds a fix to the diagnostic of replacing the = default to = delete

Diff Detail

Event Timeline

njames93 created this revision.Sep 23 2022, 9:33 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: martong. · View Herald Transcript
njames93 requested review of this revision.Sep 23 2022, 9:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 9:33 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Thank you for this, I think it's a good idea! Can you also add a release note for the changes?

This mostly LG to me but I did spot one thing I was curious about.

clang/lib/Serialization/ASTWriterDecl.cpp
2293

Should this be using 6 instead of 3 as with the other location fields? (InnerLocStart, LocEnd) And if so, we should probably add some test coverage for this bit.

njames93 added inline comments.Sep 24 2022, 10:39 AM
clang/lib/Serialization/ASTWriterDecl.cpp
2293

Whoops, Yes you're right, 6 is above 3 on on number keyboard. Technically it shouldn't make any functional change, just that the field may be expressed in more bits.

njames93 updated this revision to Diff 462684.Sep 24 2022, 10:43 AM
njames93 marked an inline comment as done.

Add release notes and fix issue in ASTWriterDecl.

njames93 updated this revision to Diff 462685.Sep 24 2022, 10:45 AM

Rebase fixing merge conflicts.

martong added inline comments.Sep 26 2022, 6:56 AM
clang/lib/AST/ASTImporter.cpp
3711

This should be imported very similarly to EndLoc.

aaron.ballman accepted this revision.Sep 30 2022, 10:11 AM

LGTM, though please address the concern by @martong before landing. Thank you!

This revision is now accepted and ready to land.Sep 30 2022, 10:11 AM
njames93 updated this revision to Diff 465042.Oct 4 2022, 9:10 AM

Address @martong's comment.

njames93 marked an inline comment as done.Oct 4 2022, 9:10 AM
njames93 updated this revision to Diff 465045.Oct 4 2022, 9:17 AM

Rebase to trunk