This revision was automatically updated to reflect the committed changes.
Closed by commit rL261574: [ASTMatchers] Add matcher hasAnyName. (authored by
sbenza).
Changed prior to commit:
http://reviews.llvm.org/D17163?vs=47802&id=48720#toc
Repository:
rL LLVM
http://reviews.llvm.org/D17163
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
Looks good. Thanks!
(I suppose, Manuel has no substantial comments on this, since he has already
seen the patch).
http://reviews.llvm.org/D17163
__
sbenza updated this revision to Diff 47802.
sbenza marked 2 inline comments as done.
sbenza added a comment.
Minor fixes:
- Add argument comments
- Move vector contructor to callers to simply API of HasNameMatcher
http://reviews.llvm.org/D17163
Files:
docs/LibASTMatchersReference.html
docs
sbenza added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:644
@@ -643,2 +643,3 @@
explicit HasNameMatcher(StringRef Name);
+ explicit HasNameMatcher(ArrayRef Names);
alexfh wrote:
> bkramer wrote:
> > alexfh wrote:
> > > Why n
alexfh added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:644
@@ -643,2 +643,3 @@
explicit HasNameMatcher(StringRef Name);
+ explicit HasNameMatcher(ArrayRef Names);
bkramer wrote:
> alexfh wrote:
> > Why not `ArrayRef`?
> Tha
bkramer added a subscriber: bkramer.
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:644
@@ -643,2 +643,3 @@
explicit HasNameMatcher(StringRef Name);
+ explicit HasNameMatcher(ArrayRef Names);
alexfh wrote:
> Why not `ArrayRef`?
That's an artifac
alexfh added a subscriber: alexfh.
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:644
@@ -643,2 +643,3 @@
explicit HasNameMatcher(StringRef Name);
+ explicit HasNameMatcher(ArrayRef Names);
Why not `ArrayRef`?
http://reviews.llvm.org/D17163
klimek added inline comments.
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:408
@@ +407,3 @@
+ PatternSet Patterns(Names);
+
+ llvm::SmallString<128> Scratch;
That empty line confuses me for some reason.
Comment at: lib/ASTMatchers/ASTMat
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
Add matcher hasAnyName as an optimization over anyOf(hasName(),...)
http://reviews.llvm.org/D17163
Files:
docs/LibASTMatchersReference.html
docs/tools/dum