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

Event Timeline

aaron.ballman added inline comments.Jul 14 2018, 5:40 AM
clang/include/clang/ASTMatchers/ASTMatchers.h
2746

missing semicolon at the end of the statement?

2750

missing semicolon at the end of the statement?

2762

missing semicolon at the end of the statement?

2768

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

clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
610

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

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.