etienneb added inline comments. ================ Comment at: include/clang/ASTMatchers/ASTMatchers.h:1578 @@ +1577,3 @@ +/// \endcode +AST_MATCHER_P(StringLiteral, lengthIs, unsigned, N) { + return Node.getLength() == N; ---------------- aaron.ballman wrote: > Perhaps we can adjust the `hasSize()` matcher instead? It currently works > with ConstantArrayType, but it seems reasonable for it to also work with > StringLiteral. I didn't like the term "size" as it typically refer to the size in bytes. Which is not the same for a wide-string.
Now, there is two different convention for naming matchers: hasLength and lengthIs ? Any toughs on that? http://reviews.llvm.org/D19876 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits