diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2016-08-02 12:06:06 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2016-08-02 14:59:34 +0000 |
commit | 82c565e9d31e86a61c47515548ad469bb9cfb476 (patch) | |
tree | 2449bd65ccd0cba63318b028f2c238ff087b9538 | |
parent | 7bd674a78f76511ecbdc419309cd0c1ca90432cb (diff) | |
download | qt-creator-82c565e9d31e86a61c47515548ad469bb9cfb476.tar.gz |
Doc: Describe requesting Clang warnings
Add a screenshot.
Change-Id: I5586d30e3a5e8701d44f96d65fc498410ceaa70d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | doc/images/qtcreator-clang-code-model-options.png | bin | 0 -> 15106 bytes | |||
-rw-r--r-- | doc/src/editors/creator-clang-codemodel.qdoc | 46 |
2 files changed, 42 insertions, 4 deletions
diff --git a/doc/images/qtcreator-clang-code-model-options.png b/doc/images/qtcreator-clang-code-model-options.png Binary files differnew file mode 100644 index 0000000000..cd28c697d9 --- /dev/null +++ b/doc/images/qtcreator-clang-code-model-options.png diff --git a/doc/src/editors/creator-clang-codemodel.qdoc b/doc/src/editors/creator-clang-codemodel.qdoc index 95ceccd083..8bd8955cd6 100644 --- a/doc/src/editors/creator-clang-codemodel.qdoc +++ b/doc/src/editors/creator-clang-codemodel.qdoc @@ -84,8 +84,37 @@ include several files, processing a single file and all the included files can take a while. - To make parsing faster, pre-compiled headers are ignored by default. You can - specify that Clang processes them in \uicontrol {Code Model} options. + To make parsing faster, pre-compiled headers are ignored by default. To + specify that Clang processes them, select \uicontrol Tools > + \uicontrol Options > \uicontrol C++ > \uicontrol {Code Model}, and + deselect the \uicontrol {Ignore pre-compiled headers} check box. + + When Clang encounters risky or possibly erroneous constructions, it issues + warnings. To request or suppress warnings, select \uicontrol Tools > + \uicontrol Options > \uicontrol C++ > \uicontrol {Code Model}. You can + either select one of the predefined configurations, or create a copy of a + configuration and edit it to fit your needs: + + \list + + \li \uicontrol {Pedantic Warnings} uses the \c -Wpendantic option that + requests all the warnings demanded by strict ISO C and ISO C++. + + \li \uicontrol {Warnings for Questionable Constructs} combines the + \c -Wall and \c -Wextra options to request all warnings about easily + avoidable questionable constructions and some additional warnings. + + \li \uicontrol {Warnings for Almost Everything} uses the \c -Weverything + option with negative options to suppress some warnings. + + \endlist + + You can edit the predefined configurations to request specific warnings + beginning with \c -W. Each of these warnings also has a negative version + that begins with \c -Wno. Keep in mind that some options turn on other + options. For more information, see + \l{https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html} + {Options to Request or Suppress Warnings} or the GCC or Clang manual pages. The following services are currently implemented in the experimental Clang code model plugin: @@ -147,8 +176,17 @@ \li Restart \QC to be able to use the plugin. - \li To process pre-compiled headers before processing any project files, - deselect the \uicontrol {Ignore pre-compiled headers} check box. + \li To specify settings for the Clang code model, select + \uicontrol Tools > \uicontrol Options > \uicontrol C++ > + \uicontrol {Code Model}. + + \image qtcreator-clang-code-model-options.png + + \li In the \uicontrol {Configuration to use} list, select the + warnings to request. + + \li To have Clang process pre-compiled headers, deselect the + \uicontrol {Ignore pre-compiled headers} check box. \endlist |