Page MenuHomePhabricator

[sema][objc] Minor refactor to OverrideSearch. NFCI.
ClosedPublic

Authored by mattd on Apr 17 2019, 9:14 PM.

Details

Summary
  • Removed a member that was only used during construction.
  • Use range-based for iteration when accessing the result of the search.
  • Require an ObjCMethodDecl reference upon construction of an
  • Constify.

Diff Detail

Repository
rC Clang

Event Timeline

mattd created this revision.Apr 17 2019, 9:14 PM
rjmccall added inline comments.Apr 18 2019, 8:02 PM
clang/lib/Sema/SemaDeclObjC.cpp
4168 ↗(On Diff #195670)

We've been trying to move towards consistently passing around AST nodes as pointers, not references. Well, at least I am; please keep this as a pointer, at any rate.

4254 ↗(On Diff #195670)

You could use auto here, I think the return type is obvious enough from the method.

4279 ↗(On Diff #195670)

This could also be auto.

mattd updated this revision to Diff 195876.Apr 19 2019, 8:26 AM
mattd marked 3 inline comments as done.
mattd edited the summary of this revision. (Show Details)

Thanks for the review, I addressed your comments:

  • Removed the reference, and pass the AST node as a pointer.
  • Made a few decls auto
This revision is now accepted and ready to land.Apr 19 2019, 10:17 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2019, 9:02 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript