This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Introduce Objective-C matchers `hasReceiver` and `isInstanceMessage` for ObjCMessageExpr
ClosedPublic

Authored by george.karpenkov on Jul 13 2018, 6:08 PM.

Diff Detail

Repository
rC Clang

Event Timeline

aaron.ballman added inline comments.Jul 14 2018, 5:40 AM
clang/include/clang/ASTMatchers/ASTMatchers.h
2746 ↗(On Diff #155543)

missing semicolon at the end of the statement?

2750 ↗(On Diff #155543)

missing semicolon at the end of the statement?

2762 ↗(On Diff #155543)

missing semicolon at the end of the statement?

2768 ↗(On Diff #155543)

getInstanceReceiver() can return null, so you need a nullptr check before calling ignore paren imp casts.

clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
610 ↗(On Diff #155543)

Spurious newline can be removed.

george.karpenkov marked 4 inline comments as done.

Addressed comments.

aaron.ballman accepted this revision.Jul 16 2018, 1:13 PM

LGTM aside from a style nit (you can take it or leave it).

clang/include/clang/ASTMatchers/ASTMatchers.h
2769 ↗(On Diff #155734)

I'd drop the != nullptr bit.

This revision is now accepted and ready to land.Jul 16 2018, 1:13 PM
This revision was automatically updated to reflect the committed changes.