Add matcher for 'MacroQualifiedType'
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
7261 | How about: Matches qualified types when the qualifier is applied via a macro. and then a second example like: int * const qual_ptr; #define nonnull _Nonnull int * const nonnull macro_qual_ptr; where we match macro_qual_ptr but not qual_ptr. | |
clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp | ||
1842–1847 | I'd appreciate extra test coverage from the example I posted above. |
clang/include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
7261 |
Forgive my broken English! :-)
Thanks for reminding me of the counter-example, it's critical for better test coverage. I'll pertain to the original one but with counter-example appended, because the macro |
LGTM!
clang/include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
7261 |
There's nothing to forgive! :-)
Oh, interesting! (I didn't test my example, so that's neat to learn.) |
How about: Matches qualified types when the qualifier is applied via a macro.
and then a second example like:
where we match macro_qual_ptr but not qual_ptr.