[cfe-dev] working with clang-format source code

Phillip van Heerden via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 1 00:59:44 PDT 2018


Hi Owen,

If you are just interested in exploring the source code of clang-format,
you have a couple of options. You can browse the llvm-mirror on GitHub
<https://github.com/llvm-mirror/clang/tree/master/tools/clang-format>. You
can also check out the LLVM + Clang + Clang tools repositories, as
documented in "Getting Started: Building and Running Clang
<https://clang.llvm.org/get_started.html>" steps 1-4. clang-format lives
under llvm/tools/clang/tools/clang-format.

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 build/bin. The first time
around the compilation will take its time, subsequent builds will be much
faster.

Regards,
Phillip van Heerden

On Wed, 1 Aug 2018 at 09:31 Owen Pan via cfe-dev <cfe-dev at lists.llvm.org>
wrote:

> Hi,
>
> 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 handles
> "simple structural rules like those in the LLVM coding standards
> <http://llvm.org/docs/CodingStandards.html#hl_earlyexit>."
>
> Thanks,
> Owen
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180801/327e0264/attachment.html>


More information about the cfe-dev mailing list