<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 17, 2015, at 6:12 , Manuel Klimek <<a href="mailto:klimek@google.com" class="">klimek@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote">On Sun, May 17, 2015 at 2:09 PM Ben Laurie <<a href="mailto:benl@google.com" class="">benl@google.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On 16 May 2015 at 16:15, Manuel Klimek <span dir="ltr" class=""><<a href="mailto:klimek@google.com" target="_blank" class="">klimek@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_quote"><span class="">On Thu, May 14, 2015 at 3:46 PM Ben Laurie <<a href="mailto:benl@google.com" target="_blank" class="">benl@google.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On 14 May 2015 at 14:43, Manuel Klimek <span dir="ltr" class=""><<a href="mailto:klimek@google.com" target="_blank" class="">klimek@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr" class="">Ah, wrong parent map :) the ast context has a function to retrieve parents that supports crossing into decls. I can look up the details when I'm back at a real computer ...</p></blockquote><div class=""><br class=""></div></div></div></div><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">Ah! Thanks.</div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">You can get the ASTContext from the CheckerContext, and then call getParents() on it.</div></div></div></blockquote><div class=""><br class=""></div></div></div></div><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">Mildly puzzled why there might be multiple parents, but in any case, it works, thanks.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Templates.</div><div class="">Template instantiation works in clang by doing tree transformations from the template pattern to the instantiated template.</div><div class="">To make this scale, non-type-dependent statements are shared between all instantiations of a template (including its pattern).</div></div></div></div></blockquote><br class=""></div><div>Actually, you can solve the original problem a bit more easily: the current LocationContext (which is also in the CheckerContext) contains a reference to the current function, method, or block.</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>