[PATCH] D19876: Add an AST matcher for string-literal length

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 08:29:33 PDT 2016


aaron.ballman added a comment.

In http://reviews.llvm.org/D19876#423582, @etienneb wrote:

> Aaron? minus re-generation of the doc.
>  Is that what you want to see?


Yes, this is the direction I was hoping for, thank you!

> note: returned types for both getLength are not the same (APInt vs unsigned int).

>  I took the 'hasSize'-Matcher approach to let overloaded operators do the job for dispatching types.


Perfect!

> note: there is a unittest for top-level node that is no longer valid because stringLiteral can be a top-level node now.


Thank you for that explanation, I was curious about that. :-)


http://reviews.llvm.org/D19876





More information about the cfe-commits mailing list