On Tue, Jun 09, 2020 at 09:31:22AM +0300, samins KAlex via cfe-dev <[hidden email]> wrote:
> How can I retreive matched node text to some variable, not dump?
> I have
> MatchResult &R;
> ASTContext *C;
> SourceManager &SM;
> I don't want to get location and re-read source file. Is there other way?
Did you try CharSourceRange::getTokenRange()? That's what clang-tidy
uses at a number of places to refer to source in diagnostics.