This patch allows fixing PR39583.
Details
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 24804 Build 24803: arc lint + arc unit
Event Timeline
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
814–815 | Can you do this via AST_POLYMORPHIC_MATCHER_P instead, given that the implementation is the same? |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
814–815 | Do you want me to add more types? e.g. TypeLoc has IgnoreParens(), too. |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
814–815 | I'd not be opposed, given that we already expose the typeLoc() matcher. I'll leave that to your discretion. |
- add unit test
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
814–815 | as discussed on IRC making it an AST_POLYMORPHIC_MATCHER_P does not seem to work, as the polymorphism is only in the return type. We do need the Node itself to be polymorphic (same type as returntype). The only working version I got was using the overloads. |
Adding a few other reviewers in case they have ideas on how to use the polymorphic matcher rather than the overload. If they don't have a better idea, then I think the overload approach is fine.
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
814–815 | You can't use AST_POLYMORPHIC_MATCHER_P to overload on input types. |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
814–815 | thanks for clarifying. |
Can you do this via AST_POLYMORPHIC_MATCHER_P instead, given that the implementation is the same?