This is an archive of the discontinued LLVM Phabricator instance.

ASTMatcher for ParenExpr node.
ClosedPublic

Authored by adek05 on Jan 17 2016, 2:02 PM.

Details

Summary

Simple matcher for parentheses in expressions.

Test Plan:
Unit tests. I also verified that the matcher can be used in clang-query.

Diff Detail

Event Timeline

adek05 updated this revision to Diff 45124.Jan 17 2016, 2:02 PM
adek05 retitled this revision from to ASTMatcher for ParenExpr node..
adek05 updated this object.
adek05 added a reviewer: klimek.
adek05 updated this revision to Diff 45133.Jan 17 2016, 2:55 PM

Fix compilation error

klimek added inline comments.Jan 17 2016, 10:16 PM
include/clang/ASTMatchers/ASTMatchers.h
1051

Add '.' in the end.

1053–1054

I don't think the second half of the sentence is necessary - it is implied by saying what the example matches.

klimek accepted this revision.Jan 17 2016, 10:29 PM
klimek edited edge metadata.

LG

include/clang/ASTMatchers/ASTMatchers.h
1051

Ah, and s/parenthesis/parentheses/.

This revision is now accepted and ready to land.Jan 17 2016, 10:29 PM

Would you mind committing it for me? I don't have repo access yet.

adek05 updated this revision to Diff 45192.Jan 18 2016, 9:18 AM
adek05 edited edge metadata.

Fix typo

adek05 updated this object.Jan 18 2016, 9:18 AM

Is the AST Matcher Reference page generated from the header and picks up this new matcher automatically or does the documentation also need an update?

Is the AST Matcher Reference page generated from the header and picks up this new matcher automatically or does the documentation also need an update?

Documentation also needs an update

adek05 updated this revision to Diff 45196.Jan 18 2016, 10:09 AM

Update online docs

aaron.ballman added a subscriber: aaron.ballman.

I have a few small nits that don't require additional review.

include/clang/ASTMatchers/ASTMatchers.h
1052

Please use doxygen-style comments for the entire comment block.

unittests/ASTMatchers/ASTMatchersTest.cpp
3570

Please change this to EXPECT_TRUE and notMatches instead (for consistency in the rest of the file).

adek05 updated this revision to Diff 45344.Jan 19 2016, 9:02 PM

@aaron.ballman comments. If it looks good, please commit it for me :)

aaron.ballman closed this revision.Jan 20 2016, 8:21 AM
aaron.ballman edited edge metadata.

Thanks! I've commit in r258321