This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add 'override' to virtual function overrides generated by ClangAttrEmitter
ClosedPublic

Authored by logan-5 on Jul 10 2020, 8:05 PM.

Details

Summary

ClangAttrEmitter.cpp generates ParsedAttr derived classes with virtual overrides in them (which end up in AttrParsedAttrImpl.inc); this patch ensures these generated functions are marked override, and not (redundantly) virtual.

I hesitate to say NFC since this does of course affect the behavior of the generator code, but the generated code behaves the same as it did before, so it's NFC in that sense.

These missing override sites were found by a Clang build equipped with -Wsuggest-override, as implemented in this patch (D82728).

Diff Detail

Event Timeline

logan-5 created this revision.Jul 10 2020, 8:05 PM
aaron.ballman accepted this revision.Jul 13 2020, 12:50 PM

LGTM, thanks!

This revision is now accepted and ready to land.Jul 13 2020, 12:50 PM

Thanks! I would appreciate any help committing this.

I have a few of these kinds of NFC override patches in flight, and I'd love to be able to commit them myself and not bother people. I wonder what the process of gaining commit access looks like? I've been a contributor for about a year, with maybe a dozen or so patches landed.

This revision was automatically updated to reflect the committed changes.