Commit Graph

12 Commits

Author SHA1 Message Date
Marco Bubke
bfd8be99be UnitTests: Fix unit test build
Guard clang include.

Change-Id: Ia72b40fa787918f47508049b045a21edf976d93a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-03 07:32:18 +00:00
Nikolai Kosjar
8df8502090 Clang: Disable a completion test for LLVM/Clang 10
For the case

  struct Foo;
  void f(Foo *foo) { foo->/*COMPLETE-HERE*/ }

no completions are expected as "Foo" is only forward declared.

This seems to be handled correctly in current LLVM/Clang master
(upcoming version 11), but wasn't with previous versions as pointless
non-member-completions were returned.

As our workaround is not applicable anymore with LLVM/Clang 10, disable
the corresponding test for that version as we cannot do anything about
it.

Change-Id: Ia02696175d0d532e16bc16a1010821b4aed20f8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:42:09 +00:00
Marco Bubke
ec3c7946af UnitTests: Fix compile without Clang
I moved the clang depend code under the condition that it is only compiled
if LLVM is present.

Change-Id: If1e37f677464ff38833c81dbebdfe8eaa563cdde
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-16 08:19:06 +00:00
Ivan Donchevskii
53c407bc0c Clang: Fix build with clang-8
Clang-Tidy checks and Clazy flags updated.
CLANG-UPGRADE-CHECK done.

Change-Id: I1ca585c5c3c77a7f183719df9c262603150914e8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-04-17 12:13:36 +00:00
Marco Bubke
de4f6301e6 Clang: Process SymbolKind and SymbolTags with the indexer
We add the infrastructure to compute the SymbolKind and SymbolTags in the
indexer. Later we have to add more for templates, virtual functions etc..

Change-Id: I9203c5cfbfffed3065337292010de5fce5736453
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 14:45:58 +00:00
Nikolai Kosjar
4f20c0d4ed Clang: Highlight invalid declarations as text
...instead of the corresponding declaration color.

Task-number: QTCREATORBUG-18686
Change-Id: Ice4d84816351af79efa286f49516c392bd80da86
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-01 14:12:58 +00:00
Nikolai Kosjar
76c25bcd6a Clang: Provide tooltips
This includes also the query data for the help system (F1) for an
identifier under cursor.

Regressions (libclang changes necessary):
 - Function signatures do not contain default values.
 - Aliases are not resolved for/at:
   - template types
   - qualified name of a type

Fixes/Improvements:
 - Resolve "auto"
 - On a template type, show also the template parameter.
 - For a typedef like
     typedef long long superlong;
   the tooltip was "long long superlong", which was confusing.
   Now, "long long" is shown.

New:
 - Show first or \brief paragraph of a documentation comment.
 - Show size of a class at definition.
 - Show size of a field member in class definition.

Task-number: QTCREATORBUG-11259
Change-Id: Ie1a07930d0e882015d07dc43e35bb81a685cdeb8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-01-16 15:32:15 +00:00
Orgad Shaneh
8a2adfef6c Clang: Remove outdated macro
Minimum version is now 5.0.

Change-Id: Ia75a26d28e676881b8e45832cae02826d176bd5b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-01 07:47:18 +00:00
Nikolai Kosjar
5ba40cb7fb Clang: Require LLVM/Clang >= 5.0.0
...for the code model parts and declare 5.0 as the supported version for
the clang static analyzer.

Adapt versions and tests, remove code assuming clang <= 5.0.

LLVM/Clang 5 was released on 07 Sep 2017.

Task-number: QTCREATORBUG-18931
Task-number: QTCREATORBUG-18657
Task-number: QTCREATORBUG-17187
Task-number: QTCREATORBUG-14881
Change-Id: I53b00258ca06a1d2e57f9379dacc54b310687295
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-27 14:21:19 +00:00
Nikolai Kosjar
88e7af8a21 UnitTests: Disable related tests if suspend-patch is missing
Change-Id: Ifdccf2e5842aff13528e52caa4dfd3288214d723
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-07 08:59:40 +00:00
Orgad Shaneh
2c55c10cac Clang: Adapt unit tests to clang-5.0
Disable the tests on clang-3.x.

Change-Id: I80a8840c25e55785034abf7b5964a14afb01d9e7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-23 14:49:18 +00:00
Nikolai Kosjar
186368c202 UnitTests: Disable known to fail tests for Windows
So we can easily verify if other changes break anything.

The disabled tests should be all related to the by default enabled delayed
template instantiation on Windows, which is necessary to parse windows headers.

The disabled tests can be run with --gtest_also_run_disabled_tests or by
setting the env variable GTEST_ALSO_RUN_DISABLED_TESTS=1.

Change-Id: I040d881ff0a3fbf5fe85c0b3d1b8e7b0959d1b9c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-20 16:29:58 +00:00