llvm::VariadicFunction is only being used by ASTMatchers.
Having own copy here allows us to remove the other one from llvm/ADT.
Also, we can extend the API to our needs without modifying the common
implementation.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Alex, this is what we discussed to make hasAnyName take a vector<StringRef> directly.
LG
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
80 ↗ | (On Diff #51053) | It's unfortunate that we need to create an array of the argument pointers here, but it seems there's no larger common denominator of the two ways this functions can be called. One nit though: SmallVector will be a better container here. |
Minor fix
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
80 ↗ | (On Diff #51053) |
Now that we control it, we can change it to be something different. On the other hand, constructing the matchers has never been the performance bottleneck of the framework.
Done. |
Still LG.
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
82 ↗ | (On Diff #51447) |
I was confused then. I thought, the operator() in question gets called when traversing the AST, not when constructing the matcher. |