xref: /minix3/external/bsd/llvm/dist/clang/docs/ExternalClangExamples.rst (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc=======================
2f4a2713aSLionel SambucExternal Clang Examples
3f4a2713aSLionel Sambuc=======================
4f4a2713aSLionel Sambuc
5f4a2713aSLionel SambucIntroduction
6f4a2713aSLionel Sambuc============
7f4a2713aSLionel Sambuc
8f4a2713aSLionel SambucThis page provides some examples of the kinds of things that people have
9f4a2713aSLionel Sambucdone with Clang that might serve as useful guides (or starting points) from
10f4a2713aSLionel Sambucwhich to develop your own tools. They may be helpful even for something as
11f4a2713aSLionel Sambucbanal (but necessary) as how to set up your build to integrate Clang.
12f4a2713aSLionel Sambuc
13f4a2713aSLionel SambucClang's library-based design is deliberately aimed at facilitating use by
14f4a2713aSLionel Sambucexternal projects, and we are always interested in improving Clang to
15f4a2713aSLionel Sambucbetter serve our external users. Some typical categories of applications
16f4a2713aSLionel Sambucwhere Clang is used are:
17f4a2713aSLionel Sambuc
18f4a2713aSLionel Sambuc- Static analysis.
19f4a2713aSLionel Sambuc- Documentation/cross-reference generation.
20f4a2713aSLionel Sambuc
21f4a2713aSLionel SambucIf you know of (or wrote!) a tool or project using Clang, please send an
22f4a2713aSLionel Sambucemail to Clang's `development discussion mailing list
23f4a2713aSLionel Sambuc<http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>`_ to have it added.
24f4a2713aSLionel Sambuc(or if you are already a Clang contributor, feel free to directly commit
25f4a2713aSLionel Sambucadditions). Since the primary purpose of this page is to provide examples
26f4a2713aSLionel Sambucthat can help developers, generally they must have code available.
27f4a2713aSLionel Sambuc
28f4a2713aSLionel SambucList of projects and tools
29f4a2713aSLionel Sambuc==========================
30f4a2713aSLionel Sambuc
31f4a2713aSLionel Sambuc`<https://github.com/Andersbakken/rtags/>`_
32f4a2713aSLionel Sambuc   "RTags is a client/server application that indexes c/c++ code and keeps
33f4a2713aSLionel Sambuc   a persistent in-memory database of references, symbolnames, completions
34f4a2713aSLionel Sambuc   etc."
35f4a2713aSLionel Sambuc
36f4a2713aSLionel Sambuc`<http://rprichard.github.com/sourceweb/>`_
37f4a2713aSLionel Sambuc   "A C/C++ source code indexer and navigator"
38f4a2713aSLionel Sambuc
39f4a2713aSLionel Sambuc`<https://github.com/etaoins/qconnectlint>`_
40f4a2713aSLionel Sambuc   "qconnectlint is a Clang tool for statically verifying the consistency
41f4a2713aSLionel Sambuc   of signal and slot connections made with Qt's ``QObject::connect``."
42f4a2713aSLionel Sambuc
43f4a2713aSLionel Sambuc`<https://github.com/woboq/woboq_codebrowser>`_
44f4a2713aSLionel Sambuc   "The Woboq Code Browser is a web-based code browser for C/C++ projects.
45f4a2713aSLionel Sambuc   Check out `<http://code.woboq.org/>`_ for an example!"
46f4a2713aSLionel Sambuc
47f4a2713aSLionel Sambuc`<https://github.com/mozilla/dxr>`_
48f4a2713aSLionel Sambuc    "DXR is a source code cross-reference tool that uses static analysis
49f4a2713aSLionel Sambuc    data collected by instrumented compilers."
50f4a2713aSLionel Sambuc
51f4a2713aSLionel Sambuc`<https://github.com/eschulte/clang-mutate>`_
52f4a2713aSLionel Sambuc    "This tool performs a number of operations on C-language source files."
53f4a2713aSLionel Sambuc
54f4a2713aSLionel Sambuc`<https://github.com/gmarpons/Crisp>`_
55f4a2713aSLionel Sambuc    "A coding rule validation add-on for LLVM/clang. Crisp rules are written
56f4a2713aSLionel Sambuc    in Prolog. A high-level declarative DSL to easily write new rules is under
57f4a2713aSLionel Sambuc    development. It will be called CRISP, an acronym for *Coding Rules in
58f4a2713aSLionel Sambuc    Sugared Prolog*."
59f4a2713aSLionel Sambuc
60f4a2713aSLionel Sambuc`<https://github.com/drothlis/clang-ctags>`_
61f4a2713aSLionel Sambuc    "Generate tag file for C++ source code."
62f4a2713aSLionel Sambuc
63f4a2713aSLionel Sambuc`<https://github.com/exclipy/clang_indexer>`_
64f4a2713aSLionel Sambuc    "This is an indexer for C and C++ based on the libclang library."
65f4a2713aSLionel Sambuc
66f4a2713aSLionel Sambuc`<https://github.com/holtgrewe/linty>`_
67f4a2713aSLionel Sambuc    "Linty - C/C++ Style Checking with Python & libclang."
68f4a2713aSLionel Sambuc
69f4a2713aSLionel Sambuc`<https://github.com/axw/cmonster>`_
70f4a2713aSLionel Sambuc    "cmonster is a Python wrapper for the Clang C++ parser."
71f4a2713aSLionel Sambuc
72f4a2713aSLionel Sambuc`<https://github.com/rizsotto/Constantine>`_
73f4a2713aSLionel Sambuc    "Constantine is a toy project to learn how to write clang plugin.
74f4a2713aSLionel Sambuc    Implements pseudo const analysis. Generates warnings about variables,
75f4a2713aSLionel Sambuc    which were declared without const qualifier."
76f4a2713aSLionel Sambuc
77f4a2713aSLionel Sambuc`<https://github.com/jessevdk/cldoc>`_
78f4a2713aSLionel Sambuc    "cldoc is a Clang based documentation generator for C and C++.
79f4a2713aSLionel Sambuc    cldoc tries to solve the issue of writing C/C++ software documentation
80f4a2713aSLionel Sambuc    with a modern, non-intrusive and robust approach."
81*0a6a1f1dSLionel Sambuc
82*0a6a1f1dSLionel Sambuc`<https://github.com/AlexDenisov/ToyClangPlugin>`_
83*0a6a1f1dSLionel Sambuc    "The simplest Clang plugin implementing a semantic check for Objective-C.
84*0a6a1f1dSLionel Sambuc    This example shows how to use the ``DiagnosticsEngine`` (emit warnings,
85*0a6a1f1dSLionel Sambuc    errors, fixit hints).  See also `<http://l.rw.rw/clang_plugin>`_ for
86*0a6a1f1dSLionel Sambuc    step-by-step instructions."
87*0a6a1f1dSLionel Sambuc
88