This is an archive of the discontinued LLVM Phabricator instance.

[-Wcompletion-handler] Don't recognize init methods as conventional
ClosedPublic

Authored by vsavchenko on Mar 30 2021, 9:09 AM.

Diff Detail

Event Timeline

vsavchenko created this revision.Mar 30 2021, 9:09 AM
vsavchenko requested review of this revision.Mar 30 2021, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2021, 9:09 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
NoQ added inline comments.Apr 5 2021, 9:41 AM
clang/lib/Analysis/CalledOnceCheck.cpp
1016

You can formally check whether it's an init method by querying its ObjCMethodFamily.

vsavchenko updated this revision to Diff 335462.Apr 6 2021, 3:43 AM

Use builtin way of checking for init methods

vsavchenko marked an inline comment as done.Apr 6 2021, 3:44 AM
vsavchenko added inline comments.
clang/lib/Analysis/CalledOnceCheck.cpp
1016

That's awesome, thanks!

NoQ accepted this revision.Apr 6 2021, 10:08 AM

Looks great now!

This revision is now accepted and ready to land.Apr 6 2021, 10:08 AM
This revision was automatically updated to reflect the committed changes.
vsavchenko marked an inline comment as done.