Add matcher hasAnyName as an optimization over anyOf(hasName(),...)
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
644 ↗ | (On Diff #47704) | Why not ArrayRef<StringRef>? |
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
644 ↗ | (On Diff #47704) | 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 ↗ | (On Diff #47704) | Thanks! Good to know. Maybe a add a comment or is it just me who doesn't know this? |
Comment Actions
Minor fixes:
- Add argument comments
- Move vector contructor to callers to simply API of HasNameMatcher
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
644 ↗ | (On Diff #47704) | No reason to leak the VariadicFunction design into here. |
Comment Actions
Looks good. Thanks!
(I suppose, Manuel has no substantial comments on this, since he has already seen the patch).