<div dir="ltr"><div>Thanks for sharing the insights and your experience with me, It will be very helpful to me to get started with minimal knowledge of clang AST :) <br></div><div>Thank you very much, David <br></div>PreeJackie <br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 9 Aug 2018 at 23:50, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@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">If you're looking to contribute to Clang & have a particular interest in the AST, etc - the way I started was to look at simple/small bugs in diagnostics - either false positives (a diagnostic (often a warning) produced when it shouldn't be (wehn it doesn't tell the user something actionable/buggy)) or false negatives (missed opportunity to warn a user about something important).<br><br>The way I'd do this without knowing much about Clang's code at all is to take the buggy test case and a similar non-buggy example - run clang compiling the examples in a debugger in parallel (one debugger running the buggy case, one debugger running the non-buggy case) to compare the behavior to try to find what the important difference is - and maybe somewhere near where the behavior/logic diverges, try to fix the bug.<br><br>Then send the fix for review, or start an email discussion (responding to the bug is usually not too effective because bug update email doesn't go to many people - only those subscribed to the bug) with what you've found and maybe someone with more knowledge can use that information you've provided to point you in the right direction to a fix or other questions you can research/answer to help.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 8, 2018 at 12:12 PM Praveen Velliengiri via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@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="auto">Thanks for your reply, I know the overview of how modern compilers work, but I don't know about the internal details such as working and interactions of various optimization passes. And I didn't have experience with non-uniform trees before. <div dir="auto"><br></div><div dir="auto">Things I have done so far: </div><div dir="auto">1) I tried to dump the clang ast for my toy programs to understand the AST in small scale. </div><div dir="auto"><br></div><div dir="auto">2) I have watched some of the talks about clang ast, mostly it sounds difficult to get started. </div><div dir="auto"><br></div><div dir="auto">I'm looking for contributing with some open source projects and to improve clang in future if I can.</div><div dir="auto"><br></div><div dir="auto">Thank you very much</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 8, 2018 11:50 PM, "mats petersson" <<a href="mailto:mats@planetcatfish.com" target="_blank">mats@planetcatfish.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>I'm not sure I can offer much direct help, but I think it may help if you explain more precisely what it is you're struggling with?<br></div>- Do you (not) understand the overall concept of how (modern) compilers work?<br></div>- Do you have some experience in working with tree-data structures in general? And specifically non-uniform trees (nodes have many different types of nodes in AST)<br><br>None of the above are entirely trivial, and it will take some effort to learn these things.<br></div><div><br></div><div>If you have a specific task in mind, perhaps describing what you have done so far (in form of code or words, whichever you think is the best way to describe it), and a more precise description of what you're struggling with.<br><br></div><div>I've not done much work on Clang AST myself, I've built my own compiler generating code through LLVM - my compiler has it's own form of AST nodes. I found the Kaleidoscope example good for learning "how to build your own compiler". <br><a href="https://llvm.org/docs/tutorial/LangImpl03.html" target="_blank">https://llvm.org/docs/tutorial/LangImpl03.html</a><br><br></div><div>If you haven't done so yet, and you have enough time to spend a few weeks on [probably full time days], I would definitely recommend starting to write your own compiler on top of LLVM - use (a subset of) an existing compiled language that you already know at least reasonably well, and start with the very basics - even building a trivial programmable calculator would be a learning experience if you haven't done that before.<br><br></div><div>Good luck.</div><div><br></div><div>--</div><div>Mats<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 August 2018 at 18:59, Praveen Velliengiri via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello all,</div><div>I'm new to compilers and LLVM technologies, I
find LLVM and related tools fascinating. Initially, I started to
understand and work on Clang AST. As a beginner, I find it difficult to
understand the docs, source code for clang AST. Could anyone please
guide or help me to get started and work with clang AST? More
specifically I'm looking for the Prerequisites to understand clang AST,
some beginner level open source projects which use clang AST, some blogs
or articles. I would also appreciate if you guys share your experience
in understanding clang and it's related tooling and about your
work-flow, it will be a great help for me :) <br></div><div><br></div><div>In short, "What advice you will give to a student, to understand and work with Clang and it's related projects"? <br></div><div><br></div><div>Thank you very much </div></div>
<br>_______________________________________________<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>
<br></blockquote></div><br></div>
</blockquote></div></div>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div>
</blockquote></div>