Files
qt-creator/src/plugins/clangcodemodel
Nikolai Kosjar 71a0d2ddf4 Clang: Fix providing clang directory with intrinsics for *.qbs
This was forgotten in e488f10c7f.

Change-Id: I2fec272c9f1e44b3a691b782dcf6bee2a1768371
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-13 08:20:51 +00:00
..
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-03-20 14:45:04 +00:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2014-08-20 15:14:04 +02:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00
2015-01-16 12:37:56 +01:00

The ClangCodeModel plugin
=========================

The ClangCodeModel plugin integrates the clang frontend into Qt Creator. Clang
is "a C language family frontend for LLVM". You can find more information at
http://clang.llvm.org/.

At the time of writing the plugin can replace the following functionality of
the built-in code model:
    * Highlighting
    * Completion

All other functionality relies on the built-in code model (indexing, quick
fixes, follow symbol, find usages, ...).

Setup
=====

Compile the plugin
------------------

1. Get libclang

You need to have libclang (and thus llvm) installed on your system. Either
build llvm/clang yourself [1], install some ready-to-use package [2] or use the
package manager of your system.

    [1] http://clang.llvm.org/get_started.html
        See http://llvm.org/docs/GettingStarted.html#git-mirror for git mirrors.
    [2] http://llvm.org/releases/ or http://llvm.org/builds/

If you are building llvm/clang yourself, make sure to build it in release mode.

2. Set LLVM_INSTALL_DIR and (re)build Qt Creator

Point the LLVM_INSTALL_DIR variable to the build/installation directory of
llvm, e.g.:

    Installed via package manager on GNU/Linux:
        LLVM_INSTALL_DIR=/usr/lib/llvm-3.4
    Manually build on Unix in release mode:
        LLVM_INSTALL_DIR=$HOME/llvm-build/Release+Asserts
    Installed a snapshot on Windows:
        LLVM_INSTALL_DIR=C:\llvm

Set the variable either as part of the build environment or pass it directly to
qmake and rebuild Qt Creator. Watch out for a message like

    Project MESSAGE: Building ClangCodeModel plugin with Clang from /usr/lib/llvm-3.4
    Project MESSAGE:   INCLUDEPATH += /usr/lib/llvm-3.4/include
    Project MESSAGE:   LIBS += -L/usr/lib/llvm-3.4/lib -lclang

This indicates that the ClangCodeModel plugin will be built.

Enable the plugin
-----------------

Enable the "ClangCodeModel" plugin in the dialog "Menu: Help -> About Plugins"
and restart Qt Creator.

Select the file types you want to use the ClangCodeModel for in "Menu: Tools ->
Options -> C++ -> Tab: Code Model". For the next opened file matching the
selected file types the ClangCodeModel will be used (see limitations at the
start of this README).