summaryrefslogtreecommitdiff
path: root/src/plugins/clangrefactoring
Commit message (Collapse)AuthorAgeFilesLines
...
* Clang: Tool tips for clang query diagnosticsMarco Bubke2017-07-248-5/+220
| | | | | | | | If you hover a diagnostics in for a clang query you get now a simple tool tip. Change-Id: I6352dd3d4b9a33c183e69037eac903469b90eea4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Add clang query paneMarco Bubke2017-07-2023-71/+1444
| | | | | | | We now support highlighting for an example text and for the query. Change-Id: I88c415ff871cf3e4c2d4fc83d60a8555bf0ce08a Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Fix clang refactoring enablingMarco Bubke2017-07-201-0/+2
| | | | | Change-Id: Icdd539c4e537e5aab55943010055c9719dd622fe Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Make file ids uniqueTim Jenssen2017-07-031-14/+1
| | | | | | | | Clang file ids are only unique for one query. Because we query in parallel we have to manage our own unique ids. Change-Id: I67d57d8b1766cab75ad252a14e57bbf9dc5fdb79 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Fix canceling of clang queryMarco Bubke2017-06-281-0/+1
| | | | | | | | | Every AST unit is created and queried asynchronously, like before, but we don't wait anymore but use a timer to process new sources. So the server will not be blocked and can process other messages like cancel. Change-Id: If0e69466c78f628190f59fd32a03cab1c3a4d0a3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Fix MSVC64 warningsOrgad Shaneh2017-04-261-1/+1
| | | | | | | size_t -> uint conversion Change-Id: Id86168a9e2b9b7f9793cedccc41a6d15c0a8dfd4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Ignore CHeaderMarco Bubke2017-02-201-1/+6
| | | | | | | | | | Because we don't now if a *.h file is a C or C++ header we provide both as project file if a C and C++ file is present. But C++ is not readable by C compiler. So we skip that files and hope there is no non referenced C header, which is very very unlikely. Change-Id: I5505713e759749c8a0738e11b70bb6b309412966 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Silence warningsMarco Bubke2017-02-202-6/+38
| | | | | Change-Id: I63f8a85f0a352fc8f41835bd3ab1574255d4436b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Cancel query progress barMarco Bubke2017-02-203-1/+9
| | | | | Change-Id: I1b8a4ec052a548e5ed09f39c3f0d3c87b13a6bd4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Remove unused codeMarco Bubke2017-02-203-102/+2
| | | | | Change-Id: If04ec8854dd61e88c14f52d4c4fb23734407c27e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Remove dependency on PchManagerMarco Bubke2017-02-161-2/+1
| | | | | Change-Id: I9084cb3c741b3e56e3b931383b67c0564a331352 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Fix spelling of unitttest_publicMarco Bubke2017-02-031-1/+1
| | | | | Change-Id: Id90dbfe30bb1f1c147299c4ac8cd210dbe7d8b82 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Add ClangPchManagerMarco Bubke2017-01-302-6/+6
| | | | | | | | | | | | Compiling every header file again and again is quite time comsuming. There are technics to improve this like preambles(a kind of automated precompiled header) but they don't share their data between translation units. This approach provides an automatically generated precompiled header for every project and subproject to improve the loading time. Change-Id: I34f5bd4db21951175920e2a9bbf6b97b1d705969 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Introduce a TemporaryDirectory and TemporaryFile classTobias Hunger2017-01-201-1/+0
| | | | | | | | Both wrap the corresponding Qt class, but make sure all temporary files or directories are created inside a "master temporary directory". Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Change UNIT_TEST_PUBLIC in unitttest_publicTim Jenssen2017-01-091-1/+1
| | | | | | Change-Id: If60f24e3b055d543ba7864d4eb7e8287721d1012 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Consolidate all ClangCompilerOptionsBuilder into one implementationMarco Bubke2016-12-155-222/+18
| | | | | | | | We used the same code in different but don't shared it. From a bug fixing perspective it's actually not that smart. Change-Id: Iaaffc883229e259ff77f95b5cf0a8f0d8b5117df Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Fix buildNikolai Kosjar2016-12-131-11/+1
| | | | | | Change-Id: I279f5641f3e9a54e6d03003cd6b4e2740e54aa15 Reviewed-by: Florian Apolloner <florian@apolloner.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Clang: Filter generated filesMarco Bubke2016-12-071-9/+33
| | | | | | | Generated files are not available, so clang will stop with an fatal error. Change-Id: I80754015a1daf48cbf2ce8e06526c75b05b2901c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Connect alive timerMarco Bubke2016-12-073-1/+14
| | | | | | | You had to set the no alive timer environment variable. Change-Id: I1994087a68d8293963f9f48fa1632f7c6822b146 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Add refactoring support for unsaved contentMarco Bubke2016-12-073-6/+44
| | | | | | | | We need the generated UI header but we don't have a build directory. So we provide clang with in memory represations of the file. Change-Id: Ie9db97bbea2222b0203a0457baa1f1fc7ad97213 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Call the finishProcess() in ~RefactoringConnectionClientMarco Bubke2016-12-072-0/+6
| | | | | | | Otherwise we call virtual function in the base class. Change-Id: I35a3d9a59dc6558b9386ccfa7169cef5f2e15e10 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Improve ClangRefactoringPlugin initializingMarco Bubke2016-12-072-33/+37
| | | | | Change-Id: I2e45d588e7a8c50b61b401c6dea9f3cf8db45611 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Add offset to search resultsTim Jenssen2016-11-233-4/+6
| | | | | | | | | | | Offset are better to compute the length of a text range. The only problem is that we get them for utf8 because that is the text representation of source file. QTextDocument is Utf16 based, so it can not binary represent the source file. Actually I do not see a simple performing workaround for it. Change-Id: Id615e1ee6a6e85c6ecc4f8044e275142409d9b46 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Extend clang queryTim Jenssen2016-11-2319-296/+342
| | | | | | | It's a first step to introduce clang query. Change-Id: I4d001a8883f56066765ce6bc561fa3f49611c0a4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.2'Orgad Shaneh2016-11-211-3/+4
|\ | | | | | | Change-Id: I957c22020fbacb2f631220b0cdc7fa16a782798b
* \ Merge remote-tracking branch 'origin/4.2'Eike Ziller2016-11-163-3/+9
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/plugins/clangrefactoring/refactoringengine.cpp src/tools/clangrefactoringbackend/source/symbolfinder.cpp Change-Id: I7c1c87f3b8ade43a07f6668565501042e967fa8b
| * Clang: Take precompiled headers into account when parsing source filesDenis Klychkov2016-11-163-3/+9
| | | | | | | | | | | | Task-number: QTCREATORBUG-15590 Change-Id: Icbfce4ffd6e9f9802641d35d898fa1dc1c4c18ee Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Clang: Add clang queryTim Jenssen2016-11-1524-56/+1087
| | | | | | | | | | | | | | | | | | Clang query is mechanism to use AST matcher to search for code. Think about regular expression but in the context of AST. So you get a semantic search tool for C++. Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Clang: use a pri file to set clang definesTim Jenssen2016-11-011-2/+1
|/ | | | | Change-Id: I52167ab3ce480c795cb0f0bcd749f97b34db86d3 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang*: Workaround parsing mingw's <type_traits> with clang 3.9Nikolai Kosjar2016-10-181-0/+1
| | | | | | | | | | | | ...for -std=gnu++0x. Define the unknown identifier/type "__float128" so at least the headers can be parsed successfully. Of course this does not help for parsing client code referencing that identifier, but this should be the less common case. Task-number: QTCREATORBUG-17126 Change-Id: Id321311713029d8aa77e068b02361d86debfada6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clang: Avoid running into gcc/mingw intrinsicsNikolai Kosjar2016-10-181-0/+1
| | | | | | | | | | | | Same as for the Clang Static Analyzer, so move the implementation into the base class and use it. This has gone unnoticed so far because it looks like that the error diagnostic from the bug report can be extracted with libclang (as shown in the info bar), but is not printed from libclang or clang.exe itself. Change-Id: I5b714ba374c5fdefe234faf012a3515e96c9a08c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clang: Fix parsing MSVC's crtdefs.h for 64 BitNikolai Kosjar2016-10-181-0/+1
| | | | | | | | | | | | | ...by specifying the word width, as for the Clang Static Analyzer. This has gone unnoticed so far because it looks like that the error diagnostic from the bug report can be extracted with libclang (as shown in the info bar), but is not printed from libclang or clang.exe itself. Task-number: QTCREATORBUG-17130 Change-Id: Ia7a5ee3825c7211cdf80c2166a9eb454ce48cac1 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ClangStaticAnalyzer: Fix path for intrinsics for clang toolchainsNikolai Kosjar2016-10-132-13/+6
| | | | | | | | | | | | | Ignore the include path for intrinsics coming from the toolchain. The clang static analyzer comes with its own intrinsics and does not cope well with intrinsics from other clang versions. Move the relevant implementation from LibClangOptionsBuilder into the base class so that ClangStaticAnalyzer profits from this, too. Task-number: QTCREATORBUG-17102 Change-Id: Id9a28ddebb889c862939332dce888a80b3bb7e63 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clang: Clarify process output prefixNikolai Kosjar2016-09-221-2/+2
| | | | | | | | "stderr" is clearer and it does not get in the way when searching for diagnostics starting with "error: ". Change-Id: I7dcd679ad65964ee66d69385550d808f6dbf91ae Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Finish refactoring process explicitMarco Bubke2016-09-211-0/+4
| | | | | Change-Id: I90b5efd8cf0492c7528ebdf14d6b5dc0b7b28536 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Initialize not static but at plug initializationMarco Bubke2016-09-212-12/+27
| | | | | Change-Id: I856c35c81d13f31c290ef40dad5ee647ab521052 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ClangRefactoring: Fix Msvc warningAlessandro Portale2016-09-121-1/+1
| | | | | | | | clangrefactoringplugin.cpp(51): warning C4138: '*/' found outside of comment. Change-Id: I0cda4e07e43ece2ec24ebb130394ac007d6e7646 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clangbackend: Fix warnings about inconsistent use of overrideTobias Hunger2016-08-161-3/+3
| | | | | Change-Id: Ic9debe482a34637f838a1badbd0ef9fcb6651258 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Add clang refactoringMarco Bubke2016-08-0414-0/+832
Change-Id: I2e3f36f810276da3f8dc7dcc587b06f8edb586d3 GPush-Base: d02f51b48fc752fddcdef6dcb32b3f7f6c0195a3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>