<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="text-align:left; direction:ltr;"><div>Hi,</div><div><br></div><div>Have you tried using:</div><div>`clang::tooling::fixit::getText(const T &Node, const ASTContext &);`</div><div>Internally that uses</div><div>`clang::Lexer::getSourceText(CharSourceRange, const SourceManager &, const LangOptions &, bool *Invalid);`</div><div><br></div><div>Hope this helps,</div><div>Nathan</div><div><br></div><div>On Tue, 2020-06-09 at 09:31 +0300, samins KAlex via cfe-dev wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Good day!</div><div>How can I retreive matched node text to some variable, not dump?</div><div>I have</div><div>MatchResult &R;</div><div>ASTContext *C;</div><div>SourceManager &SM;</div><div> </div><div>I don't want to get location and re-read source file. Is there other way?</div><div> </div>
<pre>_______________________________________________</pre><pre>cfe-dev mailing list</pre><pre><a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a></pre><pre><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></pre><pre><br></pre></blockquote></body></html>