<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jun 2, 2015 at 9:25 PM Nate Wilson <<a href="mailto:nwilson20@gmail.com">nwilson20@gmail.com</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"><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><br></div><div>Do you mean where in the Clang source it was generated? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p></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></div></blockquote><div><br></div><div>Depends on what you want to do - can you expand on what you are trying to build?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p>I'd appreciate any help.</p><p>Thank you,</p><p>Nate</p><p><br></p>
</div>
</blockquote></div></div>