<div dir="ltr">Hi Owen,<div><br></div><div>If you are just interested in exploring the source code of clang-format, you have a couple of options. You can browse the <a href="https://github.com/llvm-mirror/clang/tree/master/tools/clang-format" target="_blank">llvm-mirror on GitHub</a>. You can also check out the LLVM + Clang + Clang tools repositories, as documented in "<a href="https://clang.llvm.org/get_started.html" target="_blank">Getting Started: Building and Running Clang</a>" steps 1-4. clang-format lives under <font face="monospace">llvm/tools/clang/tools/clang-format</font>. </div><div><br></div><div>If you want to poke around and try changing some things, you can then compile the code by following step 7 in the getting started guide ("Build LLVM and Clang"). The binaries will show up in <font face="monospace">build/bin</font>. The first time around the compilation will take its time, subsequent builds will be much faster.</div><div><br></div><div>Regards,</div><div>Phillip van Heerden</div><br><div class="gmail_quote"><div dir="ltr">On Wed, 1 Aug 2018 at 09:31 Owen Pan via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@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="ltr">Hi,<div><br></div><div>I'd like to explore the source code of clang-format. Do I have to download and build the entire clang? I'm interested in how clang-format <span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">handles "simple structural rules </span><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">like those in </span><a href="http://llvm.org/docs/CodingStandards.html#hl_earlyexit" style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif" target="_blank">the LLVM coding standards</a><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">."</span></div><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif"><br></span></div><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">Thanks,</span></div><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">Owen</span></div></div>
_______________________________________________<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>
</blockquote></div></div>