Add matcher hasAnyName as an optimization over anyOf(hasName(),...)
Details
Diff Detail
Event Timeline
| include/clang/ASTMatchers/ASTMatchersInternal.h | ||
|---|---|---|
| 644 | Why not ArrayRef<StringRef>? | |
| include/clang/ASTMatchers/ASTMatchersInternal.h | ||
|---|---|---|
| 644 | That's an artifact of how llvm::VariadicFunction works. It gives you an array ref of pointers to the arguments. | |
| include/clang/ASTMatchers/ASTMatchersInternal.h | ||
|---|---|---|
| 644 | Thanks! Good to know. Maybe a add a comment or is it just me who doesn't know this? | |
Minor fixes:
- Add argument comments
- Move vector contructor to callers to simply API of HasNameMatcher
| include/clang/ASTMatchers/ASTMatchersInternal.h | ||
|---|---|---|
| 644 | No reason to leak the VariadicFunction design into here. | |
Looks good. Thanks!
(I suppose, Manuel has no substantial comments on this, since he has already seen the patch).
Why not ArrayRef<StringRef>?