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

Owen Pan via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 1 23:59:45 PDT 2018


Hi Phillip,

Thanks for the info. I know I can build the entire clang, which includes
clang-format, but I don't know if there is a way to download and build only
the part of clang that's required for clang-format. Any advice would be
appreciated.

Thanks,
Owen

On Wed, Aug 1, 2018 at 1:03 AM Phillip van Heerden <
vanheerden.phillip at gmail.com> wrote:

> 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/8ecb0f9b/attachment.html>


More information about the cfe-dev mailing list