<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 12:25 PM, Nate Wilson <span dir="ltr"><<a href="mailto:nwilson20@gmail.com" target="_blank">nwilson20@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><p dir="ltr">Hi,</p>
<p dir="ltr">Is there any way to get information about where a diagnostic came from in clang, e.g. the source from which the Diagnostic was constructed? For example, when I try to assign to a member which doesn't exist in my class/struct, I get:</p><p dir="ltr">error: no member named 'foo' in 'Bar'</p><p>Is there anyway for clang to tell me where this Diagnostic came from?<br></p></div></blockquote><div>Diagnostic::getLocation and Diagnostic::getRanges ?</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><p></p><p><br></p><p>Similarly, when the AST is constructed and I'm able to assign a value to foo, is there anyway for me to get the information about where the lookup is correctly found (for a data member in particular)? <br></p><p>Or, do would I need to do some libAST tooling, get called back when a match is found, and debug from there?</p><p>I'd appreciate any help.</p><p>Thank you,</p><p>Nate</p><p><br></p>
</div>
<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>
<br></blockquote></div><br></div></div>