Skip to content
C/C++ source code indexing tool based on libclang
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake/Modules Minor installation-related modifications Jul 29, 2013
libclang++ Implement a memory-limited cache of translation units. Sep 13, 2013
request Bug fix in requests handling Aug 15, 2013
util Code documentation and CMakeLists reorganization Jul 26, 2013
application.hxx Improved handling of Python <2.7 Aug 6, 2013
compilationDatabase.cxx Use a transaction when loading a compilation database. Sep 8, 2013
complete.cxx Added checks for libclang in CMakeLists Feb 25, 2013
env.el Automatically generate user documentation Aug 6, 2013
findDefinition.cxx Display relative file paths for `find-def` results Aug 2, 2013
grep.cxx Display relative file paths for `grep` results. Aug 5, 2013
main.cxx Add a 'cachesize' command line option to specify the size of the Sep 13, 2013
sourceFile.hxx Update entirely in C++ Apr 1, 2013


clang-tags is a C / C++ source code indexing tool. Unlike many other indexing tools, clang-tags relies on the clang compiler (via the libclang interface) to analyse and index the source code base.

Its main features are:

  • generating compilation databases in a build-system-agnostic way,
  • indexing a C/C++ project source files,
  • finding the definition location of an identifier in a source file,
  • finding all uses of a definition in the project sources.

The quick start guide is a good place to get a quick look at clang-tags various features.

Please see the user manual for a complete description of clang-tags features and a usage documentation.


The installation guide should provide all information to build and install clang-tags.

Getting started

The quick start guide should get you started in a few minutes. It is also a good starting point to get a quick overview of the features clang-tags provides.

To go a step further, all details are in the user manual.

See also

Similar tools

  • Bear: a tool to generate compilation databases.
  • clang-ctags: a similar project using libclang to generate ctags/etags index files.
  • rtags: another C/C++ code indexer based on libclang. rtags is much more advanced and featureful than clang-tags, its only (minor) drawback being its long list of dependencies.
  • clangd (proposal / design document): a Clang-based IDE-like service (still in design phase AFAIK).

Clang documentation


If you make improvements to this code or have suggestions, please do not hesitate to fork the repository or submit bug reports on github. The repository's URL is:

A doxygen-generated documentation targeted at developers is available here. Please do not hesitate to consult it, should you need help implementing in clang-tags the killer feature you need.



Copyright (C) 2013 François Févotte.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

You can’t perform that action at this time.