<div dir="ltr">the MatchResult has a clang::ASTContext* const field, not a clang::ASTContext const * - am I missing something?</div><br><div class="gmail_quote"><div dir="ltr">On Sat, Sep 3, 2016 at 4:25 AM Julian Bangert via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>is there a particular reason why clang::ast_matchers::match (<a href="http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder.html#a8b5a0b1b4d21c32009ad9e75ef8d5502" target="_blank">http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder.html#a8b5a0b1b4d21c32009ad9e75ef8d5502</a>) requires a non-const reference to a clang::ASTContext, but the matchresuly only has a const clang::ASTContext *field? This makes it hard to further apply matchers on the match result.</div><div><br></div><div>At least conceptually, shouldn't the AST matcher not modify the AST it operates on (and therefore be able to accept a const context)? </div><div>If  the AST matcher has state that some matchers might modify, should we instead return a mutable ASTContext in matchresult? </div><div><br></div><div>Regards,</div><div>Julian </div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>