jcking1034 marked an inline comment as not done. jcking1034 added inline comments.
================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6358 +/// \code +/// int* x = 0; +/// \endcode ---------------- ymandel wrote: > I think you need a const here (to the right) to be considered a qualified > type loc. I've decided to use a different example to be a bit clearer. ================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6400 +/// pointerTypeLoc(hasPointeeLoc(loc(asString("int")))) +/// matches `int*`. +AST_MATCHER_P(PointerTypeLoc, hasPointeeLoc, TypeLocMatcher, PointeeMatcher) { ---------------- ymandel wrote: > I think `int` not `int*`? I think this should be correct. If we were to look at `int** x`, `pointerTypeLoc(hasPointeeLoc(pointerTypeLoc(hasPointeeLoc(loc(asString("int"))))))` will match the whole `TypeLoc` and `pointerTypeLoc(hasPointeeLoc(loc(asString("int"))))` will match `int*`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111242/new/ https://reviews.llvm.org/D111242 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits