Commit Graph

8 Commits

Author SHA1 Message Date
Marco Bubke
a78655e521 Fix Utils::LanguageVersion::None handling
Change-Id: Id0d8bd59c1a317103ea309ee2f9b982ecfd6d6c7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-04 09:12:50 +00:00
Marco Bubke
5dbaf387ba Utils: Move C++ language details from ProjectExplorer to Utils
We want to use them in the backend processes too so it's nice to share them
in Utils. A concrete size was added too because they should be serialized.

Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-15 10:37:03 +00:00
Nikolai Kosjar
6aa11eb75e CppTools/ProjectExplorer: Remove enum duplication
... between CppTools::ProjectPart and ProjectExplorer::ToolChain.

Change-Id: I8b448747e454adbed77547460383b8515462cc81
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-08 12:34:57 +00:00
Nikolai Kosjar
5900766ecb Toolchains: Detect unspecified language version
We checked the command line from the project manager for "-std=X" and
friends to figure out the language version to use. However, if such a
flag was not provided, we assumed the latest version we support. This
could conflict with the actual version of the compiler and its
predefined macros.

Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the
predefined macros of the toolchain. The MSVC compiler is an exception to
this, as it does not seem to properly set the value - check for
_MSVC_LANG if possible, otherwise simply assume some versions as before.

While at it, add also support for C17/C18 and the upcoming C++2a.

Task-number: QTCREATORBUG-20884
Task-number: QTCREATORBUG-21188
Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-08 09:07:56 +00:00
Sergey Morozov
f01ee04f4f Cppcheck: Kill current check process only when needed
Kill only if it processes specified files

Change-Id: I5dee99ec8aeaf3bf4d9dbf6aad195f54176170a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-30 07:38:40 +00:00
Sergey Morozov
a108a912dd Cppcheck: Fix progress parsing
Change-Id: I14bc5b93b00fee25d9e307606c4fc7b30ca23fe8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-28 15:44:14 +00:00
Orgad Shaneh
7f2bbe9cfb Cppcheck: Reduce uses of auto
Conform to coding rules.

Change-Id: I57600bd450665d5db87710bb2444e39e7ecbf3e3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-26 10:02:32 +00:00
Sergey Morozov
31b595314c Cppcheck: Add cppcheck static analysis tool
Automatically checks currently opened documents and displays results via text marks/annotations.

CppcheckTrigger detects when to check files or clear results.
CppcheckTextMarkManager stores/clears text marks with checks' results.
CppcheckTool generates run arguments and parses output.
CppcheckRunner runs cppcheck binary.
CppcheckOptions configures CppcheckTool.

Task-number: QTCREATORBUG-20418
Change-Id: I8eafeac7af6137d2c9061ae75d4a56c85b3b5a2d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-18 19:07:12 +00:00