In some (legacy) C files, new and delete may be used for regular identifier.
There are some limitations:
* Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the
other files in the project.
* QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue.
Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
If you have no LLVM installed it was impossible to compile the unit test.
But some unit test don't depend on LLVM. With this change it is now
possible to compile them.
Change-Id: Iac0c1b3cdf6c317e6ba4755acd5f8458db5a7451
Reviewed-by: David Schulz <david.schulz@qt.io>
Prevent operator selection to be ambiguous.
Change-Id: I1ff0d6aad8fe5ce24b0d1038c1b6121a595800fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
CXCodeComplete_IncludeBriefComments has to used if the translation unit
is using it too. Otherwise an assert is triggered.
Change-Id: Ia252ffd9c440144f21c2354c6885f7ae73de4b29
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Should have been done in
39103dee4f and
e2adf9b7bb respectively.
Change-Id: I4e16abf8820ed4f1e287505259d71d15e739e996
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
These items nowadays have a leading number and colon.
Change-Id: Ib274a7bc601cd06cf7b226f43b011c2b105cc12b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
It doesn't make sense to distinguish between them. When the content
changes, the labels, the number of items, and the "empty" state
change.
Change-Id: I65f77f65828626fd76bfd968abf67b608b6e267b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It was bumped to 14 in merge commit 1853f01a, due to a conflict in
unittest.pro which I confused with qtcreator.pri.
Change-Id: I1ec15d9d20d90c38849eea799a724f4c85fe36b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Project template was changed in
b18e084fc0
Change-Id: I89bf518756cd7d7859ffc6e9a56f1aed2e7e435f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Project template was changed in
b18e084fc0
Change-Id: Ib37b1e5c5c30f75bac302d605403755c8f450fbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Project template was changed in
b18e084fc0
Change-Id: I4959c15a452cf713cad86af10b81376b59b816b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We move the io operators in an extra header file because if we would
include ostream in smallstring.h we would blow the compile time.
Change-Id: Iea61ceedbbbcdd2adc6dc149794dab6e743084f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
It depends on header-only implementation.
Change-Id: Ib0a1dc92789b2d3e527f1d3cd1a4393f92e161e1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and remove all instances that became redundant now.
this excludes everything that comes from outside qtc, or looks like it
could "leave" it.
Change-Id: Idc8baad17cd1ffdc5e160ec48ea3292d633a2562
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
...by giving the Quick app more time to finish.
Change-Id: I788715bcfa0949ee1873295eb869fb4e04fd00b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Speed ups the typical use cases that can profit from this:
* Change a header file and switch then to source file
* Open documents one after the other (Follow Symbol)
* Change documents visible in splits (e.g. by refactoring action)
* Restore a session with multiple splits
Fixes the test ClangIpcServer.GetCodeCompletionDependingOnArgumets.
Change-Id: Ia575bd59780df14146dfc091a4d48794e4a0543d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Extract TranslationUnitCore, which is the API for the high-level
operations we need. TranslationUnit does not call any clang_* functions
anymore, except the one needed for disposing the CXTranslationUnit - for
now, we keep TranslationUnit the owner of TranslationUnitCore.
TranslationUnitCore will be passed on to the worker threads.
With this, the current "TranslationUnit" looses its meaning. We will
rename it to "Document" in a follow-up change.
***
TranslationUnit::cxTranslationUnit does not implicitly
creates/parses/reparses anymore. We use more verbose update operations
now.
The test ClangIpcServer.GetCodeCompletionDependingOnArgumets fails now
because of this - CodeCompleter::completeHelper() does not recreate the
translation unit anymore, thus working on the old data.
This will be addressed in a follow-up change.
Change-Id: I6213d6f1609cd3c9a54666c84cb8b623b2fefe1c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
...in preparation for concurrent processing of documents.
Parsing and reparsing is handled by TranslationUnit. Since we will do
this in a different thread, extract the core logic into the new class
TranslationUnitUpdater, so that we can prepare the necessary data for
the run and then later incorporate the results of the parse/reparse.
Change-Id: Ic9d936d193ee6795a755f0cfc38c0b2a7bd402cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Make the necessary data implicitly shared since it might get
accessed/modified from two different threads with follow-up changes.
This applies for UnsavedFiles/UnsavedFile and ProjectPart::arguments().
* Avoid returning references.
Change-Id: I98842c1cb90ae0d344a15c63b72cbc89568722d3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>