<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">On Mon, Nov 26, 2012 at 9:46 PM, Vane, Edwin <span dir="ltr"><<a href="mailto:edwin.vane@intel.com" target="_blank">edwin.vane@intel.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I'm writing an AST Matcher that operates on Expr. I'd like to use isNullPointerConstant() but it requires an ASTContext. In the past I've been able to get an ASTContext from a Decl subclassed object using Decl::getASTContext() but that clearly won't work with Expr. So how does one get access to the ASTContext in my situation? Must the matcher mechanism be modified to provide the ASTContext to matchers? </blockquote>
<div><br></div><div>The MatchFinder::MatchResult has a field Context.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How global is an ASTContext? Given the name it seems to imply there's one context for one particular AST the matchers are being run on. If so it should be pretty easy to modify the matcher mechanism to provide this info, perhaps through MatchFinder.<br>
</blockquote><div><br></div><div>Assessment correct :)</div><div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
--<br>
Edwin Vane<br>
  Software Developer<br>
  Intel of Canada, Inc.<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div></div>