Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tohunger/qt-creator
1 result
Show changes
Commits on Source (5903)
Showing
with 2312 additions and 174 deletions
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
!core/
*.*#
*.a
*.app
*.autosave
*.core
*.debug
*.embed.manifest
*.moc
*.o
*.obj
*.orig
*.prl
*.qm
*.rc
*.rej
*.res
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
*_wrapper.bat
*_wrapper.sh
*~
.#*
*.*#
core
!core/
tags
.DS_Store
*.debug
/.qmake.cache
/.qmake.stash
/.clang-format
Makefile*
*.prl
*.app
Thumbs.db
core
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
*.embed.manifest
/.qmake.cache
/.qmake.stash
*_wrapper.sh
*_wrapper.bat
wrapper.sh
tags
ui_*.h
wrapper.bat
wrapper.sh
# qtcreator generated files
*.pro.user*
*.creator.user*
*.pro.user*
*.pyqtc.user*
*.qbs.user*
*.qmlproject.user*
*.pyqtc.user*
/src/plugins/**/*.json
/share/qtcreator/externaltools
/share/qtcreator/fonts/
/share/qtcreator/generic-highlighter/
/src/app/Info.plist
app_version.h
/src/plugins/**/*.json
/src/plugins/coreplugin/ide_version.h
/share/qtcreator/externaltools
/src/libs/qt-breakpad/bin
app_version.h
phony.c
# xemacs temporary files
......@@ -62,21 +66,21 @@ phony.c
*.ib_pdb_index
*.idb
*.ilk
*.ncb
*.opensdf
*.pdb
*.sdf
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcproj.*.*.user
*vcxproj.*
# gcov files
*.gcov
*.gcda
*.gcno
*.gcov
# MinGW generated files
*.Debug
......@@ -89,30 +93,35 @@ phony.c
/share/qtcreator/translations/*_tr.h
/share/qtcreator/translations/qtcreator_untranslated.ts
# Qml caching files
*.jsc
*.qmlc
# Directories to ignore
# ---------------------
debug/
release/
/lib/
/lib64/
.moc/
.obj/
.pch/
.rcc/
.uic/
/*-debug/
/*-release/
/doc/html/
/doc/html-dev/
/doc/api/html/
/doc/pluginhowto/html/
/dist/gdb/*.gz
/dist/gdb/python/
/dist/gdb/qtcreator-*/
/dist/gdb/source/
/dist/gdb/staging/
/dist/gdb/*.gz
.moc/
.obj/
.pch/
.rcc/
.uic/
/doc/qbs/
/doc/qtcreator/
/doc/qtcreator-dev/
/doc/pluginhowto/html/
/lib/
/lib64/
/libexec/
debug/
ipch/
release/
tmp/
# ignore both a directory as well as a symlink
/share/qtcreator/QtProject
......@@ -126,11 +135,12 @@ tmp/
/bin/cpaster
/bin/cplusplus-ast2png
/bin/cplusplus-frontend
/bin/cplusplus-keywordgen
/bin/cplusplus-mkvisitor
/bin/cplusplus-update-frontend
/bin/qbs*
/bin/qmlpuppet
/bin/qml2puppet
/bin/qmlpuppet
/bin/qtcreator
/bin/qtcreator_crash_handler
/bin/qtcreator_ctrlc_stub
......@@ -139,31 +149,33 @@ tmp/
/bin/sdktool
/share/doc/qtcreator/*.qch
/share/qtcreator/qbs/
/src/tools/qml/qmldump/qmldump
/src/tools/examplesscanner/examplesscanner
/src/tools/qml/qmldump/qmldump
/src/tools/valgrindfake/valgrind-fake
# Tests
#------
/tests/manual/qml-ast2dot/qml-ast2dot
/tests/manual/debugger/simple/libsimple_test_plugin.*dylib
/tests/manual/debugger/simple/simple_test_app
/tests/manual/preprocessor/pp
/tests/auto/aggregation/tst_aggregation
/tests/auto/algorithm/tst_algorithm
/tests/auto/changeset/tst_changeset
/tests/auto/clangstaticanalyzer/clangstaticanalyzerlogfilereader/tst_clangstaticanalyzerlogfilereader
/tests/auto/clangstaticanalyzer/clangstaticanalyzerrunner/tst_clangstaticanalyzerrunnertest
/tests/auto/cplusplus/ast/tst_ast
/tests/auto/cplusplus/c99/tst_c99
/tests/auto/cplusplus/checksymbols/tst_checksymbols
/tests/auto/cplusplus/codeformatter/tst_codeformatter
/tests/auto/cplusplus/codegen/tst_codegen
/tests/auto/cplusplus/cxx11/tst_cxx11
/tests/auto/cplusplus/cppselectionchanger/tst_cppselectionchanger
/tests/auto/cplusplus/cxx11/tst_c99
/tests/auto/cplusplus/lexer/tst_lexer
/tests/auto/cplusplus/misc/tst_misc
/tests/auto/cplusplus/simplifytypes/tst_simplifytypes
/tests/auto/cplusplus/ast/tst_ast
/tests/auto/cplusplus/codeformatter/tst_codeformatter
/tests/auto/cplusplus/cxx11/tst_cxx11
/tests/auto/cplusplus/fileiterationorder/tst_fileiterationorder
/tests/auto/cplusplus/findusages/tst_findusages
/tests/auto/cplusplus/lexer/tst_lexer
/tests/auto/cplusplus/lookup/tst_lookup
/tests/auto/cplusplus/misc/tst_misc
/tests/auto/cplusplus/preprocessor/tst_preprocessor
/tests/auto/cplusplus/semantic/tst_semantic
/tests/auto/cplusplus/simplifytypes/tst_simplifytypes
/tests/auto/cplusplus/translationunit/tst_translationunit
/tests/auto/cplusplus/typeprettyprinter/tst_typeprettyprinter
/tests/auto/debugger/qt_tst_dumpers_*
......@@ -182,14 +194,19 @@ tmp/
/tests/auto/externaltool/tst_externaltool
/tests/auto/fakevim/tst_fakevim
/tests/auto/filesearch/tst_filesearch
/tests/auto/flamegraph/tst_flamegraph
/tests/auto/generichighlighter/highlighterengine/tst_highlighterengine
/tests/auto/generichighlighter/specificrules/tst_specificrules
/tests/auto/ioutils/tst_ioutils
/tests/auto/json/tst_json
/tests/auto/mapreduce/tst_mapreduce
/tests/auto/profilewriter/tst_profilewriter
/tests/auto/qml/codemodel/check/tst_codemodel_check
/tests/auto/qml/codemodel/dependencies/tst_dependencies
/tests/auto/qml/codemodel/importscheck/tst_qml_imports_check
/tests/auto/qml/persistenttrie/tst_trie_check
/tests/auto/qml/qmldesigner/bauhaustests/tst_bauhaus
/tests/auto/qml/qmldesigner/coretests/tst_coretests
/tests/auto/qml/qmldesigner/coretests/tst_qmldesigner_core
/tests/auto/qml/qmldesigner/propertyeditortests/tst_propertyeditor
/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter
......@@ -198,11 +215,26 @@ tmp/
/tests/auto/qml/qrcparser/tst_qrcparser
/tests/auto/qml/reformatter/tst_reformatter
/tests/auto/qtcprocess/tst_qtcprocess
/tests/auto/runextensions/tst_runextensions
/tests/auto/sdktool/tst_sdktool
/tests/auto/timeline/timelineabstractrenderer/tst_timelineabstractrenderer
/tests/auto/timeline/timelineitemsrenderpass/tst_timelineitemsrenderpass
/tests/auto/timeline/timelinemodel/tst_timelinemodel
/tests/auto/timeline/timelinemodelaggregator/tst_timelinemodelaggregator
/tests/auto/timeline/timelinenotesmodel/tst_timelinenotesmodel
/tests/auto/timeline/timelinenotesrenderpass/tst_timelinenotesrenderpass
/tests/auto/timeline/timelineoverviewrenderer/tst_timelineoverviewrenderer
/tests/auto/timeline/timelinerenderer/tst_timelinerenderer
/tests/auto/timeline/timelinerenderpass/tst_timelinerenderpass
/tests/auto/timeline/timelinerenderstate/tst_timelinerenderstate
/tests/auto/timeline/timelineselectionrenderpass/tst_timelineselectionrenderpass
/tests/auto/timeline/timelinezoomcontrol/tst_timelinezoomcontrol
/tests/auto/treeviewfind/tst_treeviewfind
/tests/auto/utils/ansiescapecodehandler/tst_ansiescapecodehandler
/tests/auto/utils/fileutils/tst_fileutils
/tests/auto/utils/stringutils/tst_stringutils
/tests/auto/utils/templateengine/tst_templateengine
/tests/auto/utils_stringutils/tst_utils_stringutils
/tests/auto/utils/treemodel/tst_treemodel
/tests/auto/valgrind/callgrind/tst_callgrindparsertests
/tests/auto/valgrind/memcheck/modeldemo
/tests/auto/valgrind/memcheck/testapps/free1/free1
......@@ -221,9 +253,15 @@ tmp/
/tests/auto/valgrind/memcheck/tst_testrunner
/tests/manual/debugger/gui/gui
/tests/manual/debugger/helper/helper
/tests/manual/debugger/simple/libsimple_test_plugin.*dylib
/tests/manual/debugger/simple/simple_test_app
/tests/manual/fakevim/tst_fakevim
/tests/manual/pluginview/tst_plugindialog
/tests/manual/preprocessor/pp
/tests/manual/process/process
/tests/manual/proparser/testreader
/tests/manual/qml-ast2dot/qml-ast2dot
/tests/manual/shootout/shootout
/tests/manual/ssh/errorhandling/errorhandling
/tests/manual/ssh/remoteprocess/remoteprocess
/tests/manual/ssh/sftp/sftp
......@@ -231,23 +269,8 @@ tmp/
/tests/manual/ssh/shell/shell
/tests/manual/ssh/tunnel/tunnel
/tests/tools/qml-ast2dot/qml-ast2dot
/tests/valgrind/memcheck/modeldemo
/tests/valgrind/memcheck/parsertests
/tests/valgrind/memcheck/testapps/free1/free1
/tests/valgrind/memcheck/testapps/free2/free2
/tests/valgrind/memcheck/testapps/invalidjump/invalidjump
/tests/valgrind/memcheck/testapps/leak1/leak1
/tests/valgrind/memcheck/testapps/leak2/leak2
/tests/valgrind/memcheck/testapps/leak3/leak3
/tests/valgrind/memcheck/testapps/leak4/leak4
/tests/valgrind/memcheck/testapps/overlap/overlap
/tests/valgrind/memcheck/testapps/syscall/syscall
/tests/valgrind/memcheck/testapps/uninit1/uninit1
/tests/valgrind/memcheck/testapps/uninit2/uninit2
/tests/valgrind/memcheck/testapps/uninit3/uninit3
/tests/valgrind/memcheck/testrunner
/tests/valgrind/callgrind/callgrindparsertests
/tests/valgrind/callgrind/modeltest
/tests/unit/echoserver/echo
/tests/unit/unittest/unittest
# qbs builds
/*-debug/
......
CONFIG += c++11
......@@ -6,24 +6,26 @@ Qt Creator is a cross-platform IDE for development with the Qt framework.
The standalone binary packages support the following platforms:
Windows 7 or later
(K)Ubuntu Linux 14.04 (64-bit) or later
macOS 10.8 or later
Building the sources requires Qt 5.5.0 or later.
* Windows 7 or later
* (K)Ubuntu Linux 16.04 (64-bit) or later
* macOS 10.10 or later
## Compiling Qt Creator
Prerequisites:
* Qt 5.5.0 or later
* Qt 5.6.2 or later
* Qt WebEngine module for QtWebEngine based help viewer
* On Windows:
* ActiveState Active Perl
* MinGW with g++ 4.7 or Visual Studio 2013 Update 2 or later
* MinGW with g++ 4.9 or Visual Studio 2015 or later
* jom
* On Mac OS X: latest Xcode
* On Linux: g++ 4.7 or later
* LLVM 3.8.0 or later (optional, needed for the Clang Code Model)
* On Linux: g++ 4.9 or later
* LLVM/Clang 3.9.0 or later (optional, needed for the Clang Code Model, see the
section "Get LLVM/Clang for the Clang Code Model")
* CMake (only for manual builds of LLVM/Clang)
* Qbs 1.7.x (optional, sources also contain Qbs itself)
The installed toolchains have to match the one Qt was compiled with.
......@@ -31,6 +33,8 @@ You can build Qt Creator with
# Optional, needed for the Clang Code Model:
export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows)
# Optional, needed to let the QbsProjectManager plugin use system Qbs:
export QBS_INSTALL_DIR=/path/to/qbs
cd $SOURCE_DIRECTORY
qmake -r
......@@ -45,7 +49,7 @@ Installation ("make install") is not needed. It is however possible, using
This section provides step by step instructions for compiling the latest
versions of Qt and Qt Creator on Windows. Alternatively, to avoid having to
compile Qt yourself, you can use one of the versions of Qt shipped with the Qt
SDK (release builds of Qt using MinGW and Visual C++ 2013 or later).
SDK (release builds of Qt using MinGW and Visual C++ 2015 or later).
For detailed information on the supported compilers, see
<https://wiki.qt.io/Building_Qt_5_from_Git> .
......@@ -53,7 +57,7 @@ For detailed information on the supported compilers, see
plan to contribute to Qt Creator, you should compile your changes with
both compilers.
2. Install msysGit from <https://msysgit.github.io/>. If you plan to
2. Install Git for Windows from <https://git-for-windows.github.io/>. If you plan to
use the MinGW compiler suite, do not choose to put git in the
default path of Windows command prompts. For more information, see
step 9.
......@@ -62,7 +66,7 @@ For detailed information on the supported compilers, see
for example, `c:\work`. If you plan to use MinGW and Microsoft Visual
Studio simultaneously or mix different Qt versions, we recommend
creating a directory structure which reflects that. For example:
`C:\work\qt5.5.1-vs12, C:\work\qt5.5.1-mingw`.
`C:\work\qt5.6.0-vs12, C:\work\qt5.6.0-mingw`.
4. Download and install Perl from <https://www.activestate.com/activeperl>
and check that perl.exe is added to the path. Run `perl -v` to verify
......@@ -103,7 +107,7 @@ For detailed information on the supported compilers, see
environment for the compiler (provided by the Windows SDK or the
compiler):
CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
set PATH=<path_to_qt>\[qtbase\]bin;<working_directory>\creator\bin;%PATH%
set QMAKESPEC=win32-msvc2013
......@@ -120,11 +124,16 @@ For detailed information on the supported compilers, see
command...` error. If a `sh.exe` is found, the compile process will fail.
You have to remove it from the path.
10. To enable the Clang-based code model: Install Clang (>= version 3.8.0)
and set the environment variable LLVM_INSTALL_DIR to point to the
installation location.
10. To make use of the Clang Code Model:
* Install LLVM/Clang - see the section "Get LLVM/Clang for the Clang
Code Model".
* Set the environment variable LLVM_INSTALL_DIR to the LLVM/Clang
installation directory.
* When you launch Qt Creator, activate the Clang Code Model plugin as
described in doc/src/editors/creator-clang-codemodel.qdoc.
11. You are now ready to configure and build Qt and Qt Creator.
11. You are now ready to configure and build Qt and Qt Creator.
Please see <https://wiki.qt.io/Building_Qt_5_from_Git> for
recommended configure-options for Qt 5.
To use MinGW, open the the shell prompt and enter:
......@@ -191,11 +200,95 @@ separate build of it. We recommend using a separate, release-built version
of Qt and Qt Creator to work on a debug-built version of Qt and Qt Creator
or using shadow builds.
## Get LLVM/Clang for the Clang Code Model
The Clang Code Model depends on the LLVM/Clang libraries. The currently
supported LLVM/Clang version is 3.9.
### Prebuilt LLVM/Clang packages
Prebuilt packages of LLVM/Clang can be downloaded from
https://download.qt.io/development_releases/prebuilt/libclang/
This should be your preferred option because you will use the version that is
shipped together with Qt Creator. In addition, the packages for Windows are
faster due to profile-guided optimization. If the prebuilt packages do not
match your configuration, you need to build LLVM/Clang manually.
If you use GCC 5 or higher on Linux, please do not use our LLVM package, but get
the package for your distribution. Our LLVM package is compiled with GCC 4, so
you get linking errors, because GCC 5 is using a C++ 11 conforming string
implementation, which is not used by GCC 4. To sum it up, do not mix GCC 5 and
GCC 4 binaries. On Ubuntu, you can download the package from
http://apt.llvm.org/ with:
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.9 main"
sudo apt-get update
sudo apt-get install llvm-3.9 libclang-3.9-dev
There is a workaround to set _GLIBCXX_USE_CXX11_ABI to 1 or 0, but we recommend
to download the package from http://apt.llvm.org/.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
### Building LLVM/Clang manually
You need to install CMake in order to build LLVM/Clang.
Build LLVM/Clang by roughly following the instructions at
http://llvm.org/docs/GettingStarted.html#git-mirror:
1. Clone LLVM and switch to a suitable branch
git clone https://git.llvm.org/git/llvm.git/
cd llvm
git checkout release_39
2. Clone Clang into llvm/tools/clang and switch to a suitable branch
cd tools
git clone https://git.llvm.org/git/clang.git/
cd clang
git checkout release_39
3. Build and install LLVM/Clang
cd ../../..
mkdir build
cd build
For Linux/macOS:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<installation location> -DLLVM_ENABLE_RTTI=ON ../llvm
make install
For Windows:
cmake -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<installation location> -DLLVM_ENABLE_RTTI=ON ..\llvm
jom install
## Third-party Components
Qt Creator includes the following third-party components,
we thank the authors who made this possible:
### Reference implementation for std::experimental::optional
https://github.com/akrzemi1/Optional
QtCreator/src/libs/3rdparty/optional
Copyright (C) 2011-2012 Andrzej Krzemienski
Distributed under the Boost Software License, Version 1.0
(see accompanying file LICENSE_1_0.txt or a copy at
http://www.boost.org/LICENSE_1_0.txt)
The idea and interface is based on Boost.Optional library
authored by Fernando Luis Cacciola Carballal
### Open Source front-end for C++ (license MIT), enhanced for use in Qt Creator
Roberto Raggi <roberto.raggi@gmail.com>
......
Qt Creator version 4.1.1 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v4.1.0..v4.1.1
General
* Fixed issues with output pane height
(QTCREATORBUG-15986, QTCREATORBUG-16829)
Editing
* Fixed performance of cleaning whitespace (QTCREATORBUG-16420)
* Fixed selection color in help viewer for dark theme (QTCREATORBUG-16375)
Help
* Fixed that no results could be shown in Locator (QTCREATORBUG-16753)
QMake Projects
* Fixed issue with make steps in deploy configurations (QTCREATORBUG-16795)
Qbs Projects
* Fixed handling of generated files (QTCREATORBUG-16976)
QML Support
* Fixed handling of circular dependencies (QTCREATORBUG-16585)
Debugging
* Fixed scrolling in memory editor (QTCREATORBUG-16751)
* Fixed expansion of items in tool tip (QTCREATORBUG-16947)
* GDB
* Fixed handling of built-in pretty printers from new versions of GDB
(QTCREATORBUG-16758)
* Fixed that remote working directory was used for local process
(QTCREATORBUG-16211)
* CDB
* Fixed display order of vectors in vectors (QTCREATORBUG-16813)
* Fixed display of QList contents (QTCREATORBUG-16750)
* QML
* Fixed that expansion state was reset when stepping
QML Profiler
* Separated compile events from other QML/JS events in statistics and
flamegraph, since compilation can happen asynchronously
Beautifier
* Fixed that beautifier was not enabled for Objective-C/C++ files
(QTCREATORBUG-16806)
Platform Specific
macOS
* Fixed issue with detecting LLDB through `xcrun`
Android
* Added API level 24 for Android 7
* Fixed debugging on Android 6+ with NDK r11+ (QTCREATORBUG-16721)
iOS
* Fixed simulator support with Xcode 8 (QTCREATORBUG-16942)
Known issue: Qt Creator is blocked until simulator finishes starting
* Fixed that standard paths reported by QStandardPaths were wrong when
running on simulator (QTCREATORBUG-13655)
* Fixed QML debugging on device (QTCREATORBUG-15812)
QNX
* Fixed QML debugging (QTCREATORBUG-17208)
Qt Creator version 4.2 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.1..v4.2.0
General
* Added experimental editor for Qt SCXML
* Added pattern substitution for variable expansion
`%{variable/pattern/replacement}` (and `%{variable//pattern/replacement}`
for replacing multiple matches)
* Added default values for variable expansion (`%{variable:-default}`)
* Added Help > System Information for bug reporting purposes
(QTCREATORBUG-16135)
* Added option to hide the central widget in Debug mode
* Fixed issues with output pane height
(QTCREATORBUG-15986, QTCREATORBUG-16829)
Welcome
* Added keyboard shortcuts for opening recent sessions and projects
* Improved performance when many sessions are shown
* Fixed dropping files on Qt Creator when Welcome screen was visible
(QTCREATORBUG-14194)
Editing
* Added action for selecting word under cursor (QTCREATORBUG-641)
* Fixed highlighting of Markdown files
(QTCREATORBUG-16304)
* Fixed performance of cleaning whitespace (QTCREATORBUG-16420)
* Fixed selection color in help viewer for dark theme (QTCREATORBUG-16375)
Help
* Added option to open link and current page in window (QTCREATORBUG-16842)
* Fixed that no results could be shown in Locator (QTCREATORBUG-16753)
All Projects
* Reworked Projects mode UI
* Grouped all device options into one options category
* Added support for toolchains for different languages (currently C and C++)
QMake Projects
* Removed Qt Labs Controls wizard which is superseded by Qt Quick Controls 2
* Fixed that run button could spuriously stay disabled
(QTCREATORBUG-16172, QTCREATORBUG-15583)
* Fixed `Open with Designer` and `Open with Linguist` for mobile and embedded Qt
(QTCREATORBUG-16558)
* Fixed Add Library wizard when selecting library from absolute path or
different drive (QTCREATORBUG-8413, QTCREATORBUG-15732, QTCREATORBUG-16688)
* Fixed issue with make steps in deploy configurations (QTCREATORBUG-16795)
CMake Projects
* Added support for CMake specific snippets
* Added support for platforms and toolsets
* Added warning for unsupported CMake versions
* Added drop down for selecting predefined values for properties
* Improved performance of opening project (QTCREATORBUG-16930)
* Made it possible to select CMake application on macOS
* Fixed that all unknown build target types were mapped to `ExecutableType`
Qbs Projects
* Made generated files available in project tree (QTCREATORBUG-15978)
* Fixed handling of generated files (QTCREATORBUG-16976)
C++ Support
* Added preview of images to tool tip on Qt resource URLs
* Added option to skip big files when indexing (QTCREATORBUG-16712)
* Fixed random crash in LookupContext (QTCREATORBUG-14911)
* Fixed `Move Definition to Class` for functions in template class and
template member functions (QTCREATORBUG-14354)
* Fixed issues with `Add Declaration`, `Add Definition`, and
`Move Definition Outside Class` for template functions
* Clang Code Model
* Added notification for parsing errors in headers
* Improved responsiveness of completion and highlighting
QML Support
* Fixed handling of circular dependencies (QTCREATORBUG-16585)
Debugging
* Added pretty printing of `QRegExp` captures, `QStaticStringData`,
`QStandardItem`, `std::weak_ptr`, `std::__1::multiset`,
and `std::pair`
* Added display of QObject hierarchy and properties in release builds
* Added support to pretty-print custom types without debug info
* Enhanced display of function pointers
* Improved pretty printing of QV4 types
* Made display of associative containers, pairs, and various smart
pointers more compact
* Made creation of custom pretty printers easier
* Fixed pretty printing of `QFixed`
* Fixed scrolling in memory editor (QTCREATORBUG-16751)
* Fixed expansion of items in tool tip (QTCREATORBUG-16947)
* GDB
* Fixed handling of built-in pretty printers from new versions of GDB
(QTCREATORBUG-16758)
* Fixed that remote working directory was used for local process
(QTCREATORBUG-16211)
* LLDB
* Added support for Qt Creator variables `%{...}` in startup commands
* CDB
* Fixed display order of vectors in vectors (QTCREATORBUG-16813)
* Fixed display of QList contents (QTCREATORBUG-16750)
* QML
* Fixed that expansion state was reset when stepping
* Fixed `Load QML Stack` with Qt 5.7 and later (QTCREATORBUG-17097)
QML Profiler
* Added option to show memory usage and allocations as flame graph
* Added option to show vertical orientation lines in timeline
(click the time ruler)
* Separated compile events from other QML/JS events in statistics and
flamegraph, since compilation can happen asynchronously
Qt Quick Designer
* Added completion to expression editor
* Added menu for editing `when` condition of states
* Added editor for managing C++ backend objects
* Added reformatting of `.ui.qml` files on save
* Added support for exporting single properties
* Added support for padding (Qt Quick 2.6)
* Added support for elide and various font properties to text items
* Fixed that it was not possible to give extracted components
the file extension `.ui.qml`
* Fixed that switching from Qt Quick Designer failed to commit pending changes
(QTCREATORBUG-14830)
* Fixed issues with pressing escape
Qt Designer
* Fixed that resources could not be selected in new form
(QTCREATORBUG-15560)
Diff Viewer
* Added local diff for modified files in Qt Creator (`Tools` > `Diff` >
`Diff Current File`, `Tools` > `Diff` > `Diff Open Files`)
(QTCREATORBUG-9732)
* Added option to diff files when they changed on disk
(QTCREATORBUG-1531)
* Fixed that reload prompt was shown when reverting change
Version Control Systems
* Gerrit
* Fixed pushing to Gerrit when remote repository is empty
(QTCREATORBUG-16780)
Test Integration
* Added option to disable crash handler when debugging
* Fixed that results were not shown when debugging (QTCREATORBUG-16693)
* Fixed that progress indicator sometimes did not stop
Model Editor
* Added zooming
* Added synchronization of selected diagram in diagram browser
Beautifier
* Fixed that beautifier was not enabled for Objective-C/C++ files
(QTCREATORBUG-16806)
Platform Specific
Windows
* Added support for MSVC 2017
* Fixed that environment variables containing special characters were not
passed correctly to user applications (QTCREATORBUG-17219)
macOS
* Fixed issue with detecting LLDB through `xcrun`
Android
* Added API level 24 for Android 7
* Improved stability of determination if application is running
* Fixed debugging on Android 6+ with NDK r11+ (QTCREATORBUG-16721)
* Fixed that running without deployment did not start emulator
(QTCREATORBUG-10237)
* Fixed that permission model downgrade was not detected as error
(QTCREATORBUG-16630)
* Fixed handling of minimum required API level (QTCREATORBUG-16740)
iOS
* Fixed simulator support with Xcode 8 (QTCREATORBUG-16942)
* Fixed that standard paths reported by QStandardPaths were wrong when
running on simulator (QTCREATORBUG-13655)
* Fixed QML debugging on device (QTCREATORBUG-15812)
Remote Linux
* Fixed crash when creating SSH key pair (QTCREATORBUG-17349)
QNX
* Fixed QML debugging (QTCREATORBUG-17208)
Credits for these changes go to:
Aaron Barany
Alessandro Portale
Alexander Drozdov
Andre Hartmann
André Pönitz
Arnold Dumas
Christian Kandeler
Christian Stenger
Daniel Langner
Daniel Trevitz
David Schulz
Eike Ziller
Florian Apolloner
Francois Ferrand
Friedemann Kleint
Giuseppe D'Angelo
Jake Petroules
Jaroslaw Kobus
Jochen Becher
Konstantin Shtepa
Kudryavtsev Alexander
Leena Miettinen
Louai Al-Khanji
Marc Reilly
Marco Benelli
Marco Bubke
Mitch Curtis
Nazar Gerasymchuk
Nikita Baryshnikov
Nikolai Kosjar
Orgad Shaneh
Oswald Buddenhagen
Øystein Walle
Robert Löhning
Serhii Moroz
Takumi ASAKI
Tasuku Suzuki
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Ulf Hermann
Vikas Pachdha
Qt Creator version 4.2.1 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v4.2.0..v4.2.1
General
* Fixed `Open Command Prompt Here` on Windows (QTCREATORBUG-17439)
Editing
* Fixed that viewport could change unexpectedly when block selection was
active but not visible in viewport (QTCREATORBUG-17475)
Help
* Fixed crash when using drag & drop with bookmarks (QTCREATORBUG-17547)
All Projects
* Fixed issue with upgrading tool chain settings in auto-detected kits
* Fixed crash when setting custom executable (QTCREATORBUG-17505)
* Fixed MSVC support on Windows Vista and earlier (QTCREATORBUG-17501)
QMake Projects
* Fixed wrong warning about incompatible compilers
* Fixed various issues with run configurations
(QTCREATORBUG-17462, QTCREATORBUG-17477)
* Fixed that `OTHER_FILES` and `DISTFILES` in subdirs projects were no longer
shown in project tree (QTCREATORBUG-17473)
* Fixed crash caused by unnormalized file paths (QTCREATORBUG-17364)
Qbs Projects
* Fixed that target OS defaulted to host OS if tool chain does not specify
target OS (QTCREATORBUG-17452)
Generic Projects
* Fixed that project files were no longer shown in project tree
C++ Support
* Fixed crash that could happen when using `auto` (QTCREATORBUG-16731)
Debugging
* Fixed issue with infinite message boxes being displayed
(QTCREATORBUG-16971)
* Fixed `QObject` property extraction with namespaced Qt builds
Platform Specific
Windows
* Fixed detection of MSVC 2017 RC as MSVC 2017
* Fixed that environment detection could time out with MSVC
(QTCREATORBUG-17474)
iOS
* Fixed that starting applications in simulator could fail, especially with
iOS 10 devices (QTCREATORBUG-17336)
Android
* Fixed that password prompt was not shown again after entering invalid
keystore password (QTCREATORBUG-17317)
Qt Creator version 4.2.2 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v4.2.1..v4.2.2
All Projects
* Fixed available kits after selecting Qt 5.8 as minimal required version
in wizard (QTCREATORBUG-17574)
* Fixed that `Run in terminal` was sometimes ignored (QTCREATORBUG-17608)
* Fixed that `This file is not part of any project` was shown in editor after
adding new file to project (QTCREATORBUG-17743)
Qt Support
* Fixed ABI detection of static Qt builds
Qbs Projects
* Fixed duplicate include paths (QTCREATORBUG-17381)
* Fixed that generated object files where shown in Locator and Advanced Search
(QTCREATORBUG-17382)
C++ Support
* Fixed that inline namespaces were used in generated code (QTCREATORBUG-16086)
Debugging
* GDB
* Fixed performance regression when resolving enum names
(QTCREATORBUG-17598)
Version Control Systems
* Git
* Fixed crash when committing and pushing to Gerrit (QTCREATORBUG-17634)
* Fixed searching for patterns starting with dash in `Files in File System`
when using `git grep`
* Fixed discarding changes before performing other actions (such as Pull)
(QTCREATORBUG-17156)
Platform Specific
Android
* Fixed that installing package with lower version number than already installed
package silently failed (QTCREATORBUG-17789)
* Fixed crash when re-running application after stopping it (QTCREATORBUG-17691)
iOS
* Fixed running applications on devices with iOS 10.1 and later
(QTCREATORBUG-17818)
BareMetal
* Fixed debugging with OpenOCD in TCP/IP mode on Windows (QTCREATORBUG-17765)
Qt Creator version 4.3 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.2..v4.3.0
General
* Added option to search `Files in File System` with Silver Searcher (`ag`)
(experimental `SilverSearcher` plugin)
* Added exclusion patterns to `Advanced Find` and custom locator filters
* Added navigation pane on right side of edit mode
* Removed dependency of Welcome mode on OpenGL, improving experience in
virtual machine environments and certain setups (QTCREATORBUG-15727)
* Fixed wrong UI colors after suspend (QTCREATORBUG-14929)
* Fixed crash with invalid themes (QTCREATORBUG-17517)
Help
* Fixed that help bookmarks got lost (QTCREATORBUG-17537)
Editing
* Added optional shortcut for duplicating current selection
* Adapted to changes of code pasting services
(QTCREATORBUG-17942, QTCREATORBUG-18192)
* Fixed freeze when highlighting `Kconfig` file (QTCREATORBUG-14611)
All Projects
* Added support for `.qrc` files in project tree for all projects
* Added Qt Creator variable `CurrentRun:Executable` (QTCREATORBUG-12201,
QTCREATORBUG-16830)
* Added choice of build system to most project wizards (QTCREATORBUG-17308)
QMake Projects
* Fixed wrong warning when specifying absolute path to mkspec
(QTCREATORBUG-17237)
* Fixed deployment of symlinks for versioned shared libraries
CMake Projects
* Added support for `server-mode` with CMake 3.7 or later
* Added products and targets to project tree
* Added option to build individual products and targets
* Removed the need for `CodeBlocks` extra generator
* Added header files to project tree, even if not listed explicitly in
project files
* Added import of configuration of existing builds
* Fixed `Build > Clean`
Generic Projects
* Added expansion of Qt Creator variables in project files
C++ Support
* Added support for `clang-query` in `Advanced Find` to experimental
`ClangRefactoring` plugin
* Added switching project and language context for parsing files to editor
toolbar
* Added support for `--gcctoolchain` option
* Improved performance of first completion in file on Windows
* Fixed handling of Objective-C/C++
* Fixed cursor position after correcting `.` to `->` (QTCREATORBUG-17697)
* Fixed that quotes were added when splitting raw string literals
(QTCREATORBUG-17717)
QML Support
* Added option to automatically format QML files on save
* Added menu item for adding expression evaluators from QML code editor
(QTCREATORBUG-17754)
* Fixed reformatting of signals (QTCREATORBUG-17886)
* Fixed issues with jumping text cursor while editing
(QTCREATORBUG-15680, QTCREATORBUG-17413)
Nim Support
* Added automatic reparsing when files are added to or removed from project
* Added Nim compiler setting to kits
* Fixed that loading projects blocked Qt Creator
* Fixed crash when opening empty projects
Debugging
* Added pretty printing of `unordered_multi(set|map)`, `boost::variant` and
`QLazilyAllocated`
* Fixed that expression evaluators were not evaluated when added
(QTCREATORBUG-17763)
* QML
* Fixed accessing items by `id` in `Debugger Console` (QTCREATORBUG-17177)
* GDB
* Fixed issue with templated types that are pretty printed differently
depending on argument type (`std::vector<bool>` versus `std::vector<t>`)
* CDB
* Changed to Python based pretty printing backend, resulting in faster
startup and more, faster, and unified pretty printers
QML Profiler
* Added performance information to QML code editor (QTCREATORBUG-17757)
* Improved performance of rendering timeline and loading trace files
* Improved error and progress reporting for loading and saving trace files
* Fixed pixmap cache size information when loading profile
(QTCREATORBUG-17424)
* Fixed UI issues (QTCREATORBUG-17939, QTCREATORBUG-17937)
Qt Quick Designer
* Added support for HiDPI
* Added text editor view
* Added tool bar for common actions
* Added changing type of item by changing type name in property editor
* Added support for `qsTranslate` (QTCREATORBUG-17714)
* Added actions for adding items, selecting visible item, and adding tab bar
to stacked containers
* Fixed that `Dialog` was not allowed in `.ui.qml` files
* Fixed that error messages could be shown twice
* Fixed handling of escaped unicode characters (QTCREATORBUG-12616)
* Fixed that document needed to be manually re-opened after type information
became available
* Fixed crash when root item is layout
* Fixed that expressions were not shown in URL input field (QTCREATORBUG-13328)
Version Control Systems
* Git
* Added option to only show the first parent of merge commits in log
* Added action to skip a commit during rebase (QTCREATORBUG-17350)
* Added option to sign-off commits
* Fixed handling of already merged files in merge tool
* Gerrit
* Added detection of Gerrit remotes
* Added support for accessing Gerrit via REST API over HTTP(S)
Test Integration
* Removed `experimental` state
* Improved display of test results (QTCREATORBUG-17104)
* Added option to limit searching for tests to folders matching pattern
(QTCREATORBUG-16705)
* Fixed detection of inherited test methods (QTCREATORBUG-17522)
* Fixed missing update of test list when QML files are added or removed
(QTCREATORBUG-17805)
SCXML Editor
* Fixed adding elements to `else` case (QTCREATORBUG-17674)
* Fixed that copying and pasting state created invalid name
Beautifier
* Uncrustify
* Added option to select config file to use
Platform Specific
Windows
* Fixed that it was not possible to save files with arbitrary extension
(QTCREATORBUG-15862)
* Fixed ABI detection for Clang
* Fixed that ABI of MSVC2017 was considered different from ABI of MSVC2015
(QTCREATORBUG-17740)
Linux
* Worked around issue that Unity menu bar vanished after editing main window in
Design mode (QTCREATORBUG-17519)
Android
* Improved package signing (QTCREATORBUG-17545, QTCREATORBUG-17304)
* Fixed issues with new Android SDK (25.3.1)
(QTCREATORBUG-17814, QTCREATORBUG-18013)
* Fixed debugging of release builds
iOS
* Added option to select developer team and provisioning profile used for
signing (QTCREATORBUG-16936)
* Fixed that starting simulator blocked Qt Creator
* Fixed `Run Without Deployment` on Simulator (QTCREATORBUG-18107)
Remote Linux
* Added incremental deployment to `tar` package deployment
QNX
* Added support for 64bit platforms
Credits for these changes go to:
Alessandro Portale
Alexander Drozdov
Alexandru Croitor
Andre Hartmann
Andreas Pakulat
André Pönitz
Arnold Dumas
BogDan Vatra
Christian Gagneraud
Christian Kandeler
Christian Stenger
Cristian Adam
Daniel Kamil Kozar
Daniel Trevitz
David Schulz
Eike Ziller
Filippo Cucchetto
Florian Apolloner
Francois Ferrand
Frank Meerkötter
Friedemann Kleint
Hugo Holgersson
Jake Petroules
James McDonnell
Jaroslaw Kobus
Jesus Fernandez
Juhapekka Piiroinen
Jörg Bornemann
Kari Oikarinen
Kavindra Palaraja
Konstantin Podsvirov
Leena Miettinen
Lorenz Haas
Lukas Holecek
Marco Benelli
Marco Bubke
Mathias Hasselmann
Max Blagay
Michael Dönnebrink
Michal Steller
Montel Laurent
Nikita Baryshnikov
Nikolai Kosjar
Oleg Yadrov
Orgad Shaneh
Oswald Buddenhagen
Przemyslaw Gorszkowski
Robert Löhning
Serhii Moroz
Tasuku Suzuki
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Ulf Hermann
Vikas Pachdha
Qt Creator version 4.3.1 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v4.3.0..v4.3.1
General
* Fixed that wizards overwrote existing files even when told not to do so
(QTCREATORBUG-18284)
Editing
* Fixed memory leak in code completion (QTCREATORBUG-18326)
All Projects
* Fixed that links in `Application Output` stopped working after application
stops (QTCREATORBUG-18134)
* Fixed that `Application Output` was no longer editable (QTCREATORBUG-18418)
QMake Projects
* Fixed `Add Library` (QTCREATORBUG-18263)
CMake Projects
* Fixed crash when restoring session with multiple CMake projects
(QTCREATORBUG-18258)
* Fixed that `test` target was missing (QTCREATORBUG-18323)
* Fixed that `STATIC` and `INTERNAL` variables were shown in project
configuration
* Fixed that CMake `message`s were not shown in `Issues` pane
(QTCREATORBUG-18318)
* Fixed issues with CMake variables that contain `//` or `#`
(QTCREATORBUG-18385)
* Fixed that deployment information could contain empty items
(QTCREATORBUG-18406)
* Fixed that targets were duplicated when importing project (QTCREATORBUG-18409)
* Fixed that building application failed first time and after build error
when using CMake < 3.7 (QTCREATORBUG-18290, QTCREATORBUG-18382)
Qbs Projects
* Fixed crash when renaming files (QTCREATORBUG-18440)
Autotools Projects
* Fixed regressions in project tree (QTCREATORBUG-18371)
C++ Support
* Fixed crash when requesting refactoring operations on invalid code
(QTCREATORBUG-18355)
QML Support
* Fixed crash when changing kit environment (QTCREATORBUG-18335)
Valgrind
* Fixed crash when running analyzer for iOS and Android (QTCREATORBUG-18254)
Version Control Systems
* Fixed filtering of untracked files in commit editor
when multiple projects are open
* Git
* Fixed that ref names were missing for `Show`
* Mercurial
* Fixed extra options in diff and log (QTCREATORBUG-17987)
* Gerrit
* Fixed parsing output from Gerrit 2.14
Test Integration
* Fixed that changing QML file triggered full rescan for tests
(QTCREATORBUG-18315)
* Fixed issues with multiple build targets
(QTCREATORBUG-17783, QTCREATORBUG-18357)
Platform Specific
Windows
* Fixed checking whether example should be copied to writable location
(QTCREATORBUG-18184)
* Fixed issues with MSVC2017 and CMake (QTCREATORBUG-17925)
macOS
* Fixed performance issue on HiDPI displays (QTBUG-61384)
WinRT
* Fixed running MSVC 2017 based applications (QTCREATORBUG-18288)
Android
* Fixed detection of MIPS64 toolchains
* Fixed that 64-bit ABIs were missing in AVD creation dialog
iOS
* Fixed running on iOS 10.3 devices (QTCREATORBUG-18380)
* Fixed crash that could occur at startup while device is connected
(QTCREATORBUG-18226)
BareMetal
* Fixed crash on shutdown
Qt Creator version 4.4 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.3..v4.4.0
General
* Added highlighting of search term in Locator results
* Added larger icons to `New` dialog
* Added locator input to extra editor and help windows (QTCREATORBUG-9696)
* Fixed theming of Debugger Console and TODO pane (QTCREATORBUG-17532)
Help
* QtWebEngine backend
* Fixed that wait cursor was sometimes never restored (QTCREATORBUG-17758)
Editing
* Added optional inline annotations for Clang code model errors and warnings,
and bookmarks
* Added optional smooth scrolling when navigating within the same file
(for example with Locator or `Follow Symbol Under Cursor`)
* Added overridable `DeleteStartOfLine` and `DeleteEndOfLine` actions
(QTCREATORBUG-18095)
* Added support for relative path to active project to `Advanced Find` >
`Files in File System` (QTCREATORBUG-18139)
* Added colors to default text editor scheme (the previous default is
available as `Default Classic`)
* FakeVim
* Fixed `gt`/`gT`/`:tabnext`/`:tabprevious`
All Projects
* Improved detection of cross-compilers
CMake Projects
* Added option to filter for CMake variables in build configuration
(QTCREATORBUG-17973)
* Added warning when detecting `CMakeCache.txt` in source directory even though
build is configured for out-of-source build (QTCREATORBUG-18381)
* Fixed `CMake configuration has changed on disk` dialog (QTCREATORBUG-18292)
* CMake >= 3.7
* Improved handling of `CMAKE_RUNTIME_OUTPUT_DIRECTORY` (QTCREATORBUG-18158)
* Removed `<Source Directory>` node from project tree
* Fixed that headers from top level directory were not shown in project tree
(QTCREATORBUG-17760)
* Fixed progress information (QTCREATORBUG-18624)
Qbs Projects
* Re-added `Qbs install` deploy step (QTCREATORBUG-17958)
* Added `rebuild` and `clean` actions to products and subprojects
(QTCREATORBUG-15919)
C++ Support
* Added option to rename files when renaming symbol using same name
(QTCREATORBUG-14696)
* Added auto-insertion of matching curly brace (QTCREATORBUG-15073)
* Fixed that C++ and Qt keywords were considered keywords in C files
(QTCREATORBUG-2818, QTCREATORBUG-18004)
* Fixed highlighting of raw string literals (QTCREATORBUG-17720)
* Fixed `Add #include` refactoring action for static functions
* Fixed crash when parsing invalid C++ code (QTCREATORBUG-18499)
* Clang Code Model
* Added highlighting of identifier under cursor, which was still
delegated to built-in code model
* Improved order of items in completion list
(QTCREATORBUG-18319, QTCREATORBUG-15445)
* Fixed function signature hint when completing constructors and functors
(QTCREATORBUG-14882)
* Fixed that completing function pointer was adding parentheses
(QTCREATORBUG-17578)
* Fixed completion inside function template (QTCREATORBUG-17222)
* Fixed wrong column number with non-ASCII characters (QTCREATORBUG-16775)
* Fixed highlighting of primitive types and operators (QTCREATORBUG-17867)
* Fixed highlighting of partial template specializations
* Fixed highlighting of functions in `using` declarations
* Fixed that keywords were highlighted in preprocessor directives
(QTCREATORBUG-15516)
* Built-in Code Model
* Fixed completion of STL containers (QTCREATORBUG-1892)
QML Support
* Updated QML parser to newer QML version (QTCREATORBUG-17842)
* Fixed crash in QML `Outline` pane
* Fixed that auto-completion could overwrite text (QTCREATORBUG-18449)
Debugging
* Added `Alt+V` + letter shortcuts to open views
* Added pretty printing for `qfloat16`, `std::{optional,byte}`, `gsl::{span,byte}`
and `boost::variant`
* Improved display of enum bitfields
* Fixed support for `long double` (QTCREATORBUG-18023)
* Fixed editing of strings (QTCREATORBUG-18681)
* LLDB
* Fixed disassembly view for code that contains quotes (QTCREATORBUG-18721)
* CDB
* Added support for extra debugging helpers and debugging helper
customization
* Added warning if run configuration uses unsupported shell command
QML Profiler
* Fixed that timeline could stay empty after analyzing small range
(QTCREATORBUG-18354)
Qt Quick Designer
* Fixed context menu items that did not work on macOS (QTCREATORBUG-18662)
Version Control Systems
* Fixed format of visual whitespace in blame, log and git rebase editors
(QTCREATORBUG-17735)
* Git
* Improved branch listing in `Show` (QTCREATORBUG-16949)
* Made `git grep` for file system search recurse into submodules
* Gerrit
* Added validation of server certificate when using REST API
* Fixed that non-Gerrit remotes were shown in `Push to Gerrit` dialog
(QTCREATORBUG-16367)
* ClearCase
* Disabled by default
Diff Viewer
* Improved performance
* Fixed state of actions in `Edit` menu
* Fixed that context information for chunks was not shown in side-by-side view
(QTCREATORBUG-18289)
* Fixed that UI blocked when showing very large diffs
Test Integration
* Added view with complete, unprocessed test output
* Made it possible to enable and disable all tests using a specific test
framework
* Fixed wrong location of results for tests with same name (QTCREATORBUG-18502)
* QTest
* Added option to run verbose and with logging of signals and slots
(`-vb` and `-vs`)
Beautifier
* Added option for using a different AStyle configuration file
* Added option for fallback style for `clang-format`
Model Editor
* Fixed crash with invalid files (QTCREATORBUG-18526)
* Fixed crash when dropping package into itself (QTCREATORBUG-18262)
Platform Specific
Windows
* Removed support for Windows CE
macOS
* Fixed that some context menu items in Qt Quick Designer did nothing
(QTCREATORBUG-18662)
Android
* Added support for API levels 25 and 26 (QTCREATORBUG-18690)
* Added support for `android-clang` (QTBUG-60455)
* Added option to run commands before app starts and after app stopped
* Fixed state of actions in `Edit` menu in text based manifest editor
iOS
* Added UI for managing simulator devices (QTCREATORBUG-17602)
Remote Linux
* Added support for `ssh-agent` (QTCREATORBUG-16245)
Universal Windows Platform
* Fixed deployment to Windows 10 Mobile devices (QTCREATORBUG-18728)
Credits for these changes go to:
Alessandro Portale
Alexander Drozdov
Andre Hartmann
André Pönitz
Christian Kandeler
Christian Stenger
Daniel Teske
David Schulz
Eike Ziller
Felix Kälberer
Florian Apolloner
Friedemann Kleint
Ivan Donchevskii
Jake Petroules
Jaroslaw Kobus
Jesus Fernandez
Jochen Becher
Jörg Bornemann
Kai Köhne
Leandro T. C. Melo
Leena Miettinen
Lorenz Haas
Marco Benelli
Marco Bubke
Mitch Curtis
Montel Laurent
Nikita Baryshnikov
Nikolai Kosjar
Orgad Shaneh
Przemyslaw Gorszkowski
Robert Löhning
Serhii Moroz
Tasuku Suzuki
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Tomasz Olszak
Tor Arne Vestbø
Ulf Hermann
Vikas Pachdha
Qt Creator version 4.4.1 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v4.4.0..v4.4.1
FakeVim
* Fixed recognition of shortened `tabnext` and `tabprevious` commands
(QTCREATORBUG-18843)
All Projects
* Fixed `Add Existing Files` for top-level project nodes (QTCREATORBUG-18896)
C++ Support
* Improved handling of parsing failures (QTCREATORBUG-18864)
* Fixed crash with invalid raw string literal (QTCREATORBUG-18941)
* Fixed that code model did not use sysroot as reported from the build system
(QTCREATORBUG-18633)
* Fixed highlighting of `float` in C files (QTCREATORBUG-18879)
* Fixed `Convert to Camel Case` (QTCREATORBUG-18947)
Debugging
* Fixed that custom `solib-search-path` startup commands were ignored
(QTCREATORBUG-18812)
* Fixed `Run in terminal` when debugging external application
(QTCREATORBUG-18912)
* Fixed pretty printing of `CHAR` and `WCHAR`
Clang Static Analyzer
* Fixed options passed to analyzer on Windows
Qt Quick Designer
* Fixed usage of `shift` modifier when reparenting layouts
SCXML Editor
* Fixed eventless transitions (QTCREATORBUG-18345)
Test Integration
* Fixed test result output when debugging
Platform Specific
Windows
* Fixed auto-detection of CMake 3.9 and later
Android
* Fixed issues with new Android SDK (26.1.1) (QTCREATORBUG-18962)
* Fixed search path for QML modules when debugging
QNX
* Fixed debugging (QTCREATORBUG-18804, QTCREATORBUG-17901)
* Fixed QML profiler startup (QTCREATORBUG-18954)
Qt Creator version 4.5 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.4..v4.5.0
General
* Implemented "fuzzy" camel case lookup similar to code completion for locator
(QTCREATORBUG-3111)
* Changed `File System` pane to tree view with top level directory selectable
from `Computer`, `Home`, `Projects`, and individual project root directories
(QTCREATORBUG-8305)
Editing
* Added shortcut for sorting selected lines
All Projects
* Added progress indicator to project tree while project is parsed
* Added support for changing the maximum number of lines shown in compile output
(QTCREATORBUG-2200)
CMake Projects
* Added groups to CMake configuration UI
* Added option to change configuration variable types
* Fixed that value was removed when renaming configuration variable
(QTCREATORBUG-17926)
C++ Support
* Fixed lookup of functions that differ only in const-ness of arguments
(QTCREATORBUG-18475)
* Fixed detection of macros defined by tool chain for `C`
* Fixed that `Refactoring` context menu blocked UI while checking for available
actions
* Clang Code Model
* Added sanity check to `Clang Code Model Warnings` option
(QTCREATORBUG-18864)
* Fixed completion in `std::make_unique` and `std::make_shared` constructors
(QTCREATORBUG-18615)
* Fixed that function argument completion switched selected overload back to
default after typing comma (QTCREATORBUG-11688)
* GCC
* Improved auto-detection to include versioned binaries and cross-compilers
QML Support
* Added wizards with different starting UI layouts
Python Support
* Added simple code folding
Debugging
* Changed pretty printing of `QFlags` and bitfields to hexadecimal
* Fixed `Run in terminal` for debugging external application
(QTCREATORBUG-18912)
* LLDB / macOS
* Added pretty printing of Core Foundation and Foundation string-like types
(QTCREATORBUG-18638)
QML Profiler
* Improved robustness when faced with invalid data
Qt Quick Designer
* Added option to only show visible items in navigator
Version Control Systems
* Added query for saving modified files before opening commit editor
(QTCREATORBUG-3857)
Beautifier
* Clang Format
* Added action `Disable Formatting for Selected Text`
* Changed formatting without selection to format the syntactic entity
around the cursor
Model Editor
* Added support for custom relations
SCXML Editor
* Fixed crash after warnings are removed
Platform Specific
Windows
* Fixed that environment variable keys were converted to upper case in build
and run configurations (QTCREATORBUG-18915)
macOS
* Fixed several issues when using case sensitive file systems while `File system
case sensitivity` is set to `Case Insensitive` (QTCREATORBUG-17929,
QTCREATORBUG-18672, QTCREATORBUG-18678)
Android
* Removed support for local deployment (QTBUG-62995)
* Removed support for Ant
* Improved checks for minimum requirements of Android tools (QTCREATORBUG-18837)
Universal Windows Platform
* Fixed deployment on Windows 10 Phone emulator
Credits for these changes go to:
Alessandro Portale
Alexander Volkov
Andre Hartmann
André Pönitz
Christian Kandeler
Christian Stenger
Claus Steuer
Daniel Trevitz
David Schulz
Eike Ziller
Friedemann Kleint
Ivan Donchevskii
Jake Petroules
Jaroslaw Kobus
Jochen Becher
Knud Dollereder
Laurent Montel
Marco Benelli
Marco Bubke
Mitch Curtis
Nikita Baryshnikov
Nikolai Kosjar
Oliver Wolff
Orgad Shaneh
Robert Löhning
Ryuji Kakemizu
Samuel Gaist
Serhii Moroz
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Ulf Hermann
Vikas Pachdha
diff --git a/tools/clang/include/clang/Lex/Preprocessor.h b/tools/clang/include/clang/Lex/Preprocessor.h
index 30cc37f6f8..3d1d9a86e0 100644
--- a/tools/clang/include/clang/Lex/Preprocessor.h
+++ b/tools/clang/include/clang/Lex/Preprocessor.h
@@ -277,6 +277,44 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
/// This is used when loading a precompiled preamble.
std::pair<int, bool> SkipMainFilePreamble;
+ class PreambleConditionalStackStore {
+ enum State {
+ Off = 0,
+ Recording = 1,
+ Replaying = 2,
+ };
+
+ public:
+ PreambleConditionalStackStore() : ConditionalStackState(Off) {}
+
+ void startRecording() { ConditionalStackState = Recording; }
+ void startReplaying() { ConditionalStackState = Replaying; }
+ bool isRecording() const { return ConditionalStackState == Recording; }
+ bool isReplaying() const { return ConditionalStackState == Replaying; }
+
+ ArrayRef<PPConditionalInfo> getStack() const {
+ return ConditionalStack;
+ }
+
+ void doneReplaying() {
+ ConditionalStack.clear();
+ ConditionalStackState = Off;
+ }
+
+ void setStack(ArrayRef<PPConditionalInfo> s) {
+ if (!isRecording() && !isReplaying())
+ return;
+ ConditionalStack.clear();
+ ConditionalStack.append(s.begin(), s.end());
+ }
+
+ bool hasRecordedPreamble() const { return !ConditionalStack.empty(); }
+
+ private:
+ SmallVector<PPConditionalInfo, 4> ConditionalStack;
+ State ConditionalStackState;
+ } PreambleConditionalStack;
+
/// \brief The current top of the stack that we're lexing from if
/// not expanding a macro and we are lexing directly from source code.
///
@@ -1662,6 +1700,11 @@ public:
/// \brief Return true if we're in the top-level file, not in a \#include.
bool isInPrimaryFile() const;
+ /// \brief Return true if we're in the main file (specifically, if we are 0
+ /// (zero) levels deep \#include. This is used by the lexer to determine if
+ /// it needs to generate errors about unterminated \#if directives.
+ bool isInMainFile() const;
+
/// \brief Handle cases where the \#include name is expanded
/// from a macro as multiple tokens, which need to be glued together.
///
@@ -1904,6 +1947,27 @@ public:
const FileEntry *getModuleHeaderToIncludeForDiagnostics(SourceLocation IncLoc,
SourceLocation MLoc);
+ bool isRecordingPreamble() const {
+ return PreambleConditionalStack.isRecording();
+ }
+
+ bool hasRecordedPreamble() const {
+ return PreambleConditionalStack.hasRecordedPreamble();
+ }
+
+ ArrayRef<PPConditionalInfo> getPreambleConditionalStack() const {
+ return PreambleConditionalStack.getStack();
+ }
+
+ void setRecordedPreambleConditionalStack(ArrayRef<PPConditionalInfo> s) {
+ PreambleConditionalStack.setStack(s);
+ }
+
+ void setReplayablePreambleConditionalStack(ArrayRef<PPConditionalInfo> s) {
+ PreambleConditionalStack.startReplaying();
+ PreambleConditionalStack.setStack(s);
+ }
+
private:
// Macro handling.
void HandleDefineDirective(Token &Tok, bool ImmediatelyAfterTopLevelIfndef);
diff --git a/tools/clang/include/clang/Lex/PreprocessorLexer.h b/tools/clang/include/clang/Lex/PreprocessorLexer.h
index 6d6cf05a96..5c2e4d4145 100644
--- a/tools/clang/include/clang/Lex/PreprocessorLexer.h
+++ b/tools/clang/include/clang/Lex/PreprocessorLexer.h
@@ -17,6 +17,7 @@
#include "clang/Lex/MultipleIncludeOpt.h"
#include "clang/Lex/Token.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
namespace clang {
@@ -176,6 +177,11 @@ public:
conditional_iterator conditional_end() const {
return ConditionalStack.end();
}
+
+ void setConditionalLevels(ArrayRef<PPConditionalInfo> CL) {
+ ConditionalStack.clear();
+ ConditionalStack.append(CL.begin(), CL.end());
+ }
};
} // end namespace clang
diff --git a/tools/clang/include/clang/Lex/PreprocessorOptions.h b/tools/clang/include/clang/Lex/PreprocessorOptions.h
index 963d95d7f1..47673aa730 100644
--- a/tools/clang/include/clang/Lex/PreprocessorOptions.h
+++ b/tools/clang/include/clang/Lex/PreprocessorOptions.h
@@ -81,7 +81,14 @@ public:
/// The boolean indicates whether the preamble ends at the start of a new
/// line.
std::pair<unsigned, bool> PrecompiledPreambleBytes;
-
+
+ /// \brief True indicates that a preamble is being generated.
+ ///
+ /// When the lexer is done, one of the things that need to be preserved is the
+ /// conditional #if stack, so the ASTWriter/ASTReader can save/restore it when
+ /// processing the rest of the file.
+ bool GeneratePreamble;
+
/// The implicit PTH input included at the start of the translation unit, or
/// empty.
std::string ImplicitPTHInclude;
@@ -145,6 +152,7 @@ public:
AllowPCHWithCompilerErrors(false),
DumpDeserializedPCHDecls(false),
PrecompiledPreambleBytes(0, true),
+ GeneratePreamble(false),
RemappedFilesKeepOriginalName(true),
RetainRemappedFileBuffers(false),
ObjCXXARCStandardLibrary(ARCXX_nolib) { }
diff --git a/tools/clang/include/clang/Serialization/ASTBitCodes.h b/tools/clang/include/clang/Serialization/ASTBitCodes.h
index 79c6a06222..40c63a4ce5 100644
--- a/tools/clang/include/clang/Serialization/ASTBitCodes.h
+++ b/tools/clang/include/clang/Serialization/ASTBitCodes.h
@@ -580,7 +580,10 @@ namespace clang {
MSSTRUCT_PRAGMA_OPTIONS = 55,
/// \brief Record code for \#pragma ms_struct options.
- POINTERS_TO_MEMBERS_PRAGMA_OPTIONS = 56
+ POINTERS_TO_MEMBERS_PRAGMA_OPTIONS = 56,
+
+ /// \brief The stack of open #ifs/#ifdefs recorded in a preamble.
+ PP_CONDITIONAL_STACK = 57,
};
/// \brief Record types used within a source manager block.
diff --git a/tools/clang/lib/Frontend/ASTUnit.cpp b/tools/clang/lib/Frontend/ASTUnit.cpp
index c1c2680dcd..b446b53fa4 100644
--- a/tools/clang/lib/Frontend/ASTUnit.cpp
+++ b/tools/clang/lib/Frontend/ASTUnit.cpp
@@ -1975,6 +1975,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(
PreprocessorOptions &PPOpts = CI->getPreprocessorOpts();
PPOpts.RemappedFilesKeepOriginalName = RemappedFilesKeepOriginalName;
PPOpts.AllowPCHWithCompilerErrors = AllowPCHWithCompilerErrors;
+ PPOpts.GeneratePreamble = PrecompilePreambleAfterNParses != 0;
// Override the resources path.
CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath;
diff --git a/tools/clang/lib/Lex/Lexer.cpp b/tools/clang/lib/Lex/Lexer.cpp
index 9c2a0163ac..72f7011d4f 100644
--- a/tools/clang/lib/Lex/Lexer.cpp
+++ b/tools/clang/lib/Lex/Lexer.cpp
@@ -528,8 +528,6 @@ SourceLocation Lexer::GetBeginningOfToken(SourceLocation Loc,
namespace {
enum PreambleDirectiveKind {
PDK_Skipped,
- PDK_StartIf,
- PDK_EndIf,
PDK_Unknown
};
}
@@ -551,8 +549,6 @@ std::pair<unsigned, bool> Lexer::ComputePreamble(StringRef Buffer,
bool InPreprocessorDirective = false;
Token TheTok;
- Token IfStartTok;
- unsigned IfCount = 0;
SourceLocation ActiveCommentLoc;
unsigned MaxLineOffset = 0;
@@ -635,33 +631,18 @@ std::pair<unsigned, bool> Lexer::ComputePreamble(StringRef Buffer,
.Case("sccs", PDK_Skipped)
.Case("assert", PDK_Skipped)
.Case("unassert", PDK_Skipped)
- .Case("if", PDK_StartIf)
- .Case("ifdef", PDK_StartIf)
- .Case("ifndef", PDK_StartIf)
+ .Case("if", PDK_Skipped)
+ .Case("ifdef", PDK_Skipped)
+ .Case("ifndef", PDK_Skipped)
.Case("elif", PDK_Skipped)
.Case("else", PDK_Skipped)
- .Case("endif", PDK_EndIf)
+ .Case("endif", PDK_Skipped)
.Default(PDK_Unknown);
switch (PDK) {
case PDK_Skipped:
continue;
- case PDK_StartIf:
- if (IfCount == 0)
- IfStartTok = HashTok;
-
- ++IfCount;
- continue;
-
- case PDK_EndIf:
- // Mismatched #endif. The preamble ends here.
- if (IfCount == 0)
- break;
-
- --IfCount;
- continue;
-
case PDK_Unknown:
// We don't know what this directive is; stop at the '#'.
break;
@@ -682,16 +663,13 @@ std::pair<unsigned, bool> Lexer::ComputePreamble(StringRef Buffer,
} while (true);
SourceLocation End;
- if (IfCount)
- End = IfStartTok.getLocation();
- else if (ActiveCommentLoc.isValid())
+ if (ActiveCommentLoc.isValid())
End = ActiveCommentLoc; // don't truncate a decl comment.
else
End = TheTok.getLocation();
return std::make_pair(End.getRawEncoding() - StartLoc.getRawEncoding(),
- IfCount? IfStartTok.isAtStartOfLine()
- : TheTok.isAtStartOfLine());
+ TheTok.isAtStartOfLine());
}
@@ -2528,6 +2506,11 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {
return true;
}
+ if (PP->isRecordingPreamble() && !PP->isInMainFile()) {
+ PP->setRecordedPreambleConditionalStack(ConditionalStack);
+ ConditionalStack.clear();
+ }
+
// Issue diagnostics for unterminated #if and missing newline.
// If we are in a #if directive, emit an error.
diff --git a/tools/clang/lib/Lex/PPLexerChange.cpp b/tools/clang/lib/Lex/PPLexerChange.cpp
index e2eceafd98..849a703671 100644
--- a/tools/clang/lib/Lex/PPLexerChange.cpp
+++ b/tools/clang/lib/Lex/PPLexerChange.cpp
@@ -46,6 +46,12 @@ bool Preprocessor::isInPrimaryFile() const {
return true;
}
+bool Preprocessor::isInMainFile() const {
+ if (IsFileLexer())
+ return IncludeMacroStack.size() == 0;
+ return true;
+}
+
/// getCurrentLexer - Return the current file lexer being lexed from. Note
/// that this ignores any potentially active macro expansions and _Pragma
/// expansions going on at the time.
diff --git a/tools/clang/lib/Lex/Preprocessor.cpp b/tools/clang/lib/Lex/Preprocessor.cpp
index 78179dd798..1da60961a8 100644
--- a/tools/clang/lib/Lex/Preprocessor.cpp
+++ b/tools/clang/lib/Lex/Preprocessor.cpp
@@ -140,6 +140,9 @@ Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
Ident_GetExceptionInfo = Ident_GetExceptionCode = nullptr;
Ident_AbnormalTermination = nullptr;
}
+
+ if (this->PPOpts->GeneratePreamble)
+ PreambleConditionalStack.startRecording();
}
Preprocessor::~Preprocessor() {
@@ -528,6 +531,12 @@ void Preprocessor::EnterMainSourceFile() {
// Start parsing the predefines.
EnterSourceFile(FID, nullptr, SourceLocation());
+
+ // Restore the conditional stack from the preamble, if there is one.
+ if (PreambleConditionalStack.isReplaying()) {
+ CurPPLexer->setConditionalLevels(PreambleConditionalStack.getStack());
+ PreambleConditionalStack.doneReplaying();
+ }
}
void Preprocessor::EndSourceFile() {
diff --git a/tools/clang/lib/Serialization/ASTReader.cpp b/tools/clang/lib/Serialization/ASTReader.cpp
index 9d1554a826..861e867341 100644
--- a/tools/clang/lib/Serialization/ASTReader.cpp
+++ b/tools/clang/lib/Serialization/ASTReader.cpp
@@ -2799,6 +2799,21 @@ ASTReader::ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities) {
}
break;
+ case PP_CONDITIONAL_STACK:
+ if (!Record.empty()) {
+ SmallVector<PPConditionalInfo, 4> ConditionalStack;
+ for (unsigned Idx = 0, N = Record.size() - 1; Idx < N; /* in loop */) {
+ auto Loc = ReadSourceLocation(F, Record, Idx);
+ bool WasSkipping = Record[Idx++];
+ bool FoundNonSkip = Record[Idx++];
+ bool FoundElse = Record[Idx++];
+ ConditionalStack.push_back(
+ {Loc, WasSkipping, FoundNonSkip, FoundElse});
+ }
+ PP.setReplayablePreambleConditionalStack(ConditionalStack);
+ }
+ break;
+
case PP_COUNTER_VALUE:
if (!Record.empty() && Listener)
Listener->ReadCounter(F, Record[0]);
diff --git a/tools/clang/lib/Serialization/ASTWriter.cpp b/tools/clang/lib/Serialization/ASTWriter.cpp
index 7589b0c5dd..dc9bb92dea 100644
--- a/tools/clang/lib/Serialization/ASTWriter.cpp
+++ b/tools/clang/lib/Serialization/ASTWriter.cpp
@@ -983,6 +983,8 @@ void ASTWriter::WriteBlockInfoBlock() {
RECORD(POINTERS_TO_MEMBERS_PRAGMA_OPTIONS);
RECORD(UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES);
RECORD(DELETE_EXPRS_TO_ANALYZE);
+ RECORD(PP_CONDITIONAL_STACK);
+
// SourceManager Block.
BLOCK(SOURCE_MANAGER_BLOCK);
@@ -2140,6 +2142,18 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) {
Stream.EmitRecord(PP_COUNTER_VALUE, Record);
}
+ if (PP.isRecordingPreamble() && PP.hasRecordedPreamble()) {
+ assert(!IsModule);
+ for (const auto &Cond : PP.getPreambleConditionalStack()) {
+ AddSourceLocation(Cond.IfLoc, Record);
+ Record.push_back(Cond.WasSkipping);
+ Record.push_back(Cond.FoundNonSkip);
+ Record.push_back(Cond.FoundElse);
+ }
+ Stream.EmitRecord(PP_CONDITIONAL_STACK, Record);
+ Record.clear();
+ }
+
// Enter the preprocessor block.
Stream.EnterSubblock(PREPROCESSOR_BLOCK_ID, 3);
diff --git a/tools/clang/test/Lexer/preamble.c b/tools/clang/test/Lexer/preamble.c
index 5b2739abef..762271f2e3 100644
--- a/tools/clang/test/Lexer/preamble.c
+++ b/tools/clang/test/Lexer/preamble.c
@@ -9,15 +9,12 @@
#pragma unknown
#endif
#ifdef WIBBLE
-#include "honk"
-#else
-int foo();
+#include "foo"
+int bar;
#endif
// This test checks for detection of the preamble of a file, which
-// includes all of the starting comments and #includes. Note that any
-// changes to the preamble part of this file must be mirrored in
-// Inputs/preamble.txt, since we diff against it.
+// includes all of the starting comments and #includes.
// RUN: %clang_cc1 -print-preamble %s > %t
// RUN: echo END. >> %t
@@ -33,4 +30,6 @@ int foo();
// CHECK-NEXT: #endif
// CHECK-NEXT: #pragma unknown
// CHECK-NEXT: #endif
+// CHECK-NEXT: #ifdef WIBBLE
+// CHECK-NEXT: #include "foo"
// CHECK-NEXT: END.
diff --git a/tools/clang/test/Lexer/preamble2.c b/tools/clang/test/Lexer/preamble2.c
new file mode 100644
index 0000000000..499a9a22a5
--- /dev/null
+++ b/tools/clang/test/Lexer/preamble2.c
@@ -0,0 +1,19 @@
+// Preamble detection test: header with an include guard.
+#ifndef HEADER_H
+#define HEADER_H
+#include "foo"
+int bar;
+#endif
+
+// This test checks for detection of the preamble of a file, which
+// includes all of the starting comments and #includes.
+
+// RUN: %clang_cc1 -print-preamble %s > %t
+// RUN: echo END. >> %t
+// RUN: FileCheck < %t %s
+
+// CHECK: // Preamble detection test: header with an include guard.
+// CHECK-NEXT: #ifndef HEADER_H
+// CHECK-NEXT: #define HEADER_H
+// CHECK-NEXT: #include "foo"
+// CHECK-NEXT: END.
diff --git a/tools/clang/lib/Sema/SemaDecl.cpp b/tools/clang/lib/Sema/SemaDecl.cpp
index 41719d4e7b..747a4cc0c5 100644
--- a/tools/clang/lib/Sema/SemaDecl.cpp
+++ b/tools/clang/lib/Sema/SemaDecl.cpp
@@ -13112,7 +13112,14 @@ CreateNewDecl:
OwnedDecl = true;
// In C++, don't return an invalid declaration. We can't recover well from
// the cases where we make the type anonymous.
- return (Invalid && getLangOpts().CPlusPlus) ? nullptr : New;
+ if (Invalid && getLangOpts().CPlusPlus) {
+ if (New->isBeingDefined())
+ if (auto RD = dyn_cast<RecordDecl>(New))
+ RD->completeDefinition();
+ return nullptr;
+ } else {
+ return New;
+ }
}
void Sema::ActOnTagStartDefinition(Scope *S, Decl *TagD) {
diff --git a/tools/clang/test/SemaCXX/conversion-function.cpp b/tools/clang/test/SemaCXX/conversion-function.cpp
index 3f494cce8c..c725a0d5b7 100644
--- a/tools/clang/test/SemaCXX/conversion-function.cpp
+++ b/tools/clang/test/SemaCXX/conversion-function.cpp
@@ -434,8 +434,12 @@ namespace PR18234 {
struct A {
operator enum E { e } (); // expected-error {{'PR18234::A::E' cannot be defined in a type specifier}}
operator struct S { int n; } (); // expected-error {{'PR18234::A::S' cannot be defined in a type specifier}}
+ // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'struct A' to 'const PR18234::A::S &' for 1st argument}}
+#if __cplusplus >= 201103L
+ // expected-note@-3 {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'struct A' to 'PR18234::A::S &&' for 1st argument}}
+#endif
} a;
- A::S s = a;
+ A::S s = a; // expected-error {{no viable conversion from 'struct A' to 'A::S'}}
A::E e = a; // expected-note {{here}}
bool k1 = e == A::e; // expected-error {{no member named 'e'}}
bool k2 = e.n == 0;
diff --git a/tools/clang/lib/Basic/FileManager.cpp b/tools/clang/lib/Basic/FileManager.cpp
index ce9b7e1bb4..6cfe1f6ebd 100644
--- a/tools/clang/lib/Basic/FileManager.cpp
+++ b/tools/clang/lib/Basic/FileManager.cpp
@@ -383,6 +383,7 @@ FileManager::getVirtualFile(StringRef Filename, off_t Size,
UFE->ModTime = ModificationTime;
UFE->Dir = DirInfo;
UFE->UID = NextFileUID++;
+ UFE->IsValid = true;
UFE->File.reset();
return UFE;
}
diff --git a/tools/clang/lib/Sema/SemaCodeComplete.cpp b/tools/clang/lib/Sema/SemaCodeComplete.cpp
index f4b51a19c2..f4b35fd408 100644
--- a/tools/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/tools/clang/lib/Sema/SemaCodeComplete.cpp
@@ -4066,7 +4066,10 @@ void Sema::CodeCompleteCall(Scope *S, Expr *Fn, ArrayRef<Expr *> Args) {
UME->copyTemplateArgumentsInto(TemplateArgsBuffer);
TemplateArgs = &TemplateArgsBuffer;
}
- SmallVector<Expr *, 12> ArgExprs(1, UME->getBase());
+
+ // Add the base as first argument (use a nullptr if the base is implicit).
+ SmallVector<Expr *, 12> ArgExprs(
+ 1, UME->isImplicitAccess() ? nullptr : UME->getBase());
ArgExprs.append(Args.begin(), Args.end());
UnresolvedSet<8> Decls;
Decls.append(UME->decls_begin(), UME->decls_end());
diff --git a/tools/clang/lib/Sema/SemaOverload.cpp b/tools/clang/lib/Sema/SemaOverload.cpp
index 40d6e910f1..19547237ac 100644
--- a/tools/clang/lib/Sema/SemaOverload.cpp
+++ b/tools/clang/lib/Sema/SemaOverload.cpp
@@ -6051,31 +6051,44 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns,
for (UnresolvedSetIterator F = Fns.begin(), E = Fns.end(); F != E; ++F) {
NamedDecl *D = F.getDecl()->getUnderlyingDecl();
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
- if (isa<CXXMethodDecl>(FD) && !cast<CXXMethodDecl>(FD)->isStatic())
+ if (isa<CXXMethodDecl>(FD) && !cast<CXXMethodDecl>(FD)->isStatic()) {
+ QualType ObjectType;
+ Expr::Classification ObjectClassification;
+ if (Expr *E = Args[0]) {
+ // Use the explit base to restrict the lookup:
+ ObjectType = E->getType();
+ ObjectClassification = E->Classify(Context);
+ } // .. else there is an implit base.
AddMethodCandidate(cast<CXXMethodDecl>(FD), F.getPair(),
- cast<CXXMethodDecl>(FD)->getParent(),
- Args[0]->getType(), Args[0]->Classify(Context),
- Args.slice(1), CandidateSet,
+ cast<CXXMethodDecl>(FD)->getParent(), ObjectType,
+ ObjectClassification, Args.slice(1), CandidateSet,
SuppressUserConversions, PartialOverloading);
- else
+ } else {
AddOverloadCandidate(FD, F.getPair(), Args, CandidateSet,
SuppressUserConversions, PartialOverloading);
+ }
} else {
FunctionTemplateDecl *FunTmpl = cast<FunctionTemplateDecl>(D);
if (isa<CXXMethodDecl>(FunTmpl->getTemplatedDecl()) &&
- !cast<CXXMethodDecl>(FunTmpl->getTemplatedDecl())->isStatic())
+ !cast<CXXMethodDecl>(FunTmpl->getTemplatedDecl())->isStatic()) {
+ QualType ObjectType;
+ Expr::Classification ObjectClassification;
+ if (Expr *E = Args[0]) {
+ // Use the explit base to restrict the lookup:
+ ObjectType = E->getType();
+ ObjectClassification = E->Classify(Context);
+ } // .. else there is an implit base.
AddMethodTemplateCandidate(FunTmpl, F.getPair(),
- cast<CXXRecordDecl>(FunTmpl->getDeclContext()),
- ExplicitTemplateArgs,
- Args[0]->getType(),
- Args[0]->Classify(Context), Args.slice(1),
- CandidateSet, SuppressUserConversions,
+ cast<CXXRecordDecl>(FunTmpl->getDeclContext()),
+ ExplicitTemplateArgs, ObjectType, ObjectClassification,
+ Args.slice(1), CandidateSet, SuppressUserConversions,
PartialOverloading);
- else
+ } else {
AddTemplateOverloadCandidate(FunTmpl, F.getPair(),
ExplicitTemplateArgs, Args,
CandidateSet, SuppressUserConversions,
PartialOverloading);
+ }
}
}
}
diff --git a/tools/clang/test/CodeCompletion/member-access.cpp b/tools/clang/test/CodeCompletion/member-access.cpp
index 8f772c0652..8528e18649 100644
--- a/tools/clang/test/CodeCompletion/member-access.cpp
+++ b/tools/clang/test/CodeCompletion/member-access.cpp
@@ -27,16 +27,31 @@ public:
void test(const Proxy &p) {
p->
- // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:29:6 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
- // CHECK-CC1: Base1 : Base1::
- // CHECK-CC1: member1 : [#int#][#Base1::#]member1
- // CHECK-CC1: member1 : [#int#][#Base2::#]member1
- // CHECK-CC1: member2 : [#float#][#Base1::#]member2
- // CHECK-CC1: member3
- // CHECK-CC1: member4
- // CHECK-CC1: memfun1 : [#void#][#Base3::#]memfun1(<#float#>)
- // CHECK-CC1: memfun1 : [#void#][#Base3::#]memfun1(<#double#>)[# const#]
- // CHECK-CC1: memfun1 (Hidden) : [#void#]Base2::memfun1(<#int#>)
- // CHECK-CC1: memfun2 : [#void#][#Base3::#]memfun2(<#int#>)
- // CHECK-CC1: memfun3 : [#int#]memfun3(<#int#>)
-
+}
+
+struct Foo {
+ void foo() const;
+ static void foo(bool);
+};
+
+struct Bar {
+ void foo(bool param) {
+ Foo::foo( );// unresolved member expression with an implicit base
+ }
+};
+
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:29:6 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
+// CHECK-CC1: Base1 : Base1::
+// CHECK-CC1: member1 : [#int#][#Base1::#]member1
+// CHECK-CC1: member1 : [#int#][#Base2::#]member1
+// CHECK-CC1: member2 : [#float#][#Base1::#]member2
+// CHECK-CC1: member3
+// CHECK-CC1: member4
+// CHECK-CC1: memfun1 : [#void#][#Base3::#]memfun1(<#float#>)
+// CHECK-CC1: memfun1 : [#void#][#Base3::#]memfun1(<#double#>)[# const#]
+// CHECK-CC1: memfun1 (Hidden) : [#void#]Base2::memfun1(<#int#>)
+// CHECK-CC1: memfun2 : [#void#][#Base3::#]memfun2(<#int#>)
+// CHECK-CC1: memfun3 : [#int#]memfun3(<#int#>)
+
+// Make sure this also doesn't crash
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:39:14 %s
diff --git a/tools/clang/include/clang-c/Index.h b/tools/clang/include/clang-c/Index.h
index 13db2085ba..eb6a5f14b2 100644
--- a/tools/clang/include/clang-c/Index.h
+++ b/tools/clang/include/clang-c/Index.h
@@ -33,6 +33,7 @@
*/
#define CINDEX_VERSION_MAJOR 0
#define CINDEX_VERSION_MINOR 35
+#define CINDEX_VERSION_HAS_BACKPORTED_SUSPEND
#define CINDEX_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
@@ -1404,6 +1405,15 @@ CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU,
unsigned options);
/**
+ * \brief Suspend a translation unit in order to free memory associated with it.
+ *
+ * A suspended translation unit uses significantly less memory but on the other
+ * side does not support any other calls than \c clang_reparseTranslationUnit
+ * to resume it or \c clang_disposeTranslationUnit to dispose it completely.
+ */
+CINDEX_LINKAGE unsigned clang_suspendTranslationUnit(CXTranslationUnit);
+
+/**
* \brief Destroy the specified CXTranslationUnit object.
*/
CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit);
diff --git a/tools/clang/include/clang/Frontend/ASTUnit.h b/tools/clang/include/clang/Frontend/ASTUnit.h
index 3eaf054139..3745ec690e 100644
--- a/tools/clang/include/clang/Frontend/ASTUnit.h
+++ b/tools/clang/include/clang/Frontend/ASTUnit.h
@@ -870,6 +870,11 @@ public:
bool Reparse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
ArrayRef<RemappedFile> RemappedFiles = None);
+ /// \brief Free data that will be re-generated on the next parse.
+ ///
+ /// Preamble-related data is not affected.
+ void ResetForParse();
+
/// \brief Perform code completion at the given file, line, and
/// column within this translation unit.
///
diff --git a/tools/clang/lib/Frontend/ASTUnit.cpp b/tools/clang/lib/Frontend/ASTUnit.cpp
index b446b53fa4..96437e15bb 100644
--- a/tools/clang/lib/Frontend/ASTUnit.cpp
+++ b/tools/clang/lib/Frontend/ASTUnit.cpp
@@ -1034,8 +1034,6 @@ static void checkAndSanitizeDiags(SmallVectorImpl<StoredDiagnostic> &
/// contain any translation-unit information, false otherwise.
bool ASTUnit::Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
std::unique_ptr<llvm::MemoryBuffer> OverrideMainBuffer) {
- SavedMainFileBuffer.reset();
-
if (!Invocation)
return true;
@@ -1083,16 +1081,12 @@ bool ASTUnit::Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
Clang->createFileManager();
FileMgr = &Clang->getFileManager();
}
+
+ ResetForParse();
+
SourceMgr = new SourceManager(getDiagnostics(), *FileMgr,
UserFilesAreVolatile);
- TheSema.reset();
- Ctx = nullptr;
- PP = nullptr;
- Reader = nullptr;
- // Clear out old caches and data.
- TopLevelDecls.clear();
- clearFileLevelDecls();
CleanTemporaryFiles();
if (!OverrideMainBuffer) {
@@ -2082,6 +2076,19 @@ bool ASTUnit::Reparse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
return Result;
}
+void ASTUnit::ResetForParse() {
+ SavedMainFileBuffer.reset();
+
+ SourceMgr.reset();
+ TheSema.reset();
+ Ctx.reset();
+ PP.reset();
+ Reader.reset();
+
+ TopLevelDecls.clear();
+ clearFileLevelDecls();
+}
+
//----------------------------------------------------------------------------//
// Code completion
//----------------------------------------------------------------------------//
diff --git a/tools/clang/tools/c-index-test/c-index-test.c b/tools/clang/tools/c-index-test/c-index-test.c
index 007af9e252..c40bdb888d 100644
--- a/tools/clang/tools/c-index-test/c-index-test.c
+++ b/tools/clang/tools/c-index-test/c-index-test.c
@@ -1664,6 +1664,8 @@ int perform_test_load_source(int argc, const char **argv,
return -1;
if (Repeats > 1) {
+ clang_suspendTranslationUnit(TU);
+
Err = clang_reparseTranslationUnit(TU, num_unsaved_files, unsaved_files,
clang_defaultReparseOptions(TU));
if (Err != CXError_Success) {
diff --git a/tools/clang/tools/libclang/CIndex.cpp b/tools/clang/tools/libclang/CIndex.cpp
index deb4cc551b..81cb5c3778 100644
--- a/tools/clang/tools/libclang/CIndex.cpp
+++ b/tools/clang/tools/libclang/CIndex.cpp
@@ -3778,6 +3778,20 @@ void clang_disposeTranslationUnit(CXTranslationUnit CTUnit) {
}
}
+unsigned clang_suspendTranslationUnit(CXTranslationUnit CTUnit) {
+ if (CTUnit) {
+ ASTUnit *Unit = cxtu::getASTUnit(CTUnit);
+
+ if (Unit && Unit->isUnsafeToFree())
+ return false;
+
+ Unit->ResetForParse();
+ return true;
+ }
+
+ return false;
+}
+
unsigned clang_defaultReparseOptions(CXTranslationUnit TU) {
return CXReparse_None;
}
diff --git a/tools/clang/tools/libclang/libclang.exports b/tools/clang/tools/libclang/libclang.exports
index c8fe0a21d0..7a8f53d394 100644
--- a/tools/clang/tools/libclang/libclang.exports
+++ b/tools/clang/tools/libclang/libclang.exports
@@ -298,6 +298,7 @@ clang_remap_getFilenames
clang_remap_getNumFiles
clang_reparseTranslationUnit
clang_saveTranslationUnit
+clang_suspendTranslationUnit
clang_sortCodeCompletionResults
clang_toggleCrashRecovery
clang_tokenize
diff --git a/tools/clang/include/clang/Frontend/ASTUnit.h b/tools/clang/include/clang/Frontend/ASTUnit.h
index 04e6dce511..3eaf054139 100644
--- a/tools/clang/include/clang/Frontend/ASTUnit.h
+++ b/tools/clang/include/clang/Frontend/ASTUnit.h
@@ -184,6 +184,14 @@ private:
/// some number of calls.
unsigned PreambleRebuildCounter;
+ /// \brief Cache pairs "filename - source location"
+ ///
+ /// Cache contains only source locations from preamble so it is
+ /// guaranteed that they stay valid when the SourceManager is recreated.
+ /// This cache is used when loading preambule to increase performance
+ /// of that loading. It must be cleared when preamble is recreated.
+ llvm::StringMap<SourceLocation> PreambleSrcLocCache;
+
public:
class PreambleData {
const FileEntry *File;
diff --git a/tools/clang/lib/Frontend/ASTUnit.cpp b/tools/clang/lib/Frontend/ASTUnit.cpp
index 76fd00a132..c1c2680dcd 100644
--- a/tools/clang/lib/Frontend/ASTUnit.cpp
+++ b/tools/clang/lib/Frontend/ASTUnit.cpp
@@ -1142,6 +1142,8 @@ bool ASTUnit::Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
if (SavedMainFileBuffer)
TranslateStoredDiagnostics(getFileManager(), getSourceManager(),
PreambleDiagnostics, StoredDiagnostics);
+ else
+ PreambleSrcLocCache.clear();
if (!Act->Execute())
goto error;
@@ -2544,8 +2546,16 @@ void ASTUnit::TranslateStoredDiagnostics(
const FileEntry *FE = FileMgr.getFile(SD.Filename);
if (!FE)
continue;
- FileID FID = SrcMgr.translateFile(FE);
- SourceLocation FileLoc = SrcMgr.getLocForStartOfFile(FID);
+ SourceLocation FileLoc;
+ auto ItFileID = PreambleSrcLocCache.find(SD.Filename);
+ if (ItFileID == PreambleSrcLocCache.end()) {
+ FileID FID = SrcMgr.translateFile(FE);
+ FileLoc = SrcMgr.getLocForStartOfFile(FID);
+ PreambleSrcLocCache[SD.Filename] = FileLoc;
+ } else {
+ FileLoc = ItFileID->getValue();
+ }
+
if (FileLoc.isInvalid())
continue;
SourceLocation L = FileLoc.getLocWithOffset(SD.LocOffset);
diff --git a/tools/clang/include/clang/Lex/Preprocessor.h b/tools/clang/include/clang/Lex/Preprocessor.h
index 3d1d9a86e0..0a02c977fc 100644
--- a/tools/clang/include/clang/Lex/Preprocessor.h
+++ b/tools/clang/include/clang/Lex/Preprocessor.h
@@ -1034,6 +1034,8 @@ public:
/// which implicitly adds the builtin defines etc.
void EnterMainSourceFile();
+ void replayPreambleConditionalStack();
+
/// \brief Inform the preprocessor callbacks that processing is complete.
void EndSourceFile();
@@ -1700,11 +1702,6 @@ public:
/// \brief Return true if we're in the top-level file, not in a \#include.
bool isInPrimaryFile() const;
- /// \brief Return true if we're in the main file (specifically, if we are 0
- /// (zero) levels deep \#include. This is used by the lexer to determine if
- /// it needs to generate errors about unterminated \#if directives.
- bool isInMainFile() const;
-
/// \brief Handle cases where the \#include name is expanded
/// from a macro as multiple tokens, which need to be glued together.
///
diff --git a/tools/clang/lib/Lex/Lexer.cpp b/tools/clang/lib/Lex/Lexer.cpp
index 72f7011d4f..5953412608 100644
--- a/tools/clang/lib/Lex/Lexer.cpp
+++ b/tools/clang/lib/Lex/Lexer.cpp
@@ -2506,7 +2506,7 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {
return true;
}
- if (PP->isRecordingPreamble() && !PP->isInMainFile()) {
+ if (PP->isRecordingPreamble() && PP->isInPrimaryFile()) {
PP->setRecordedPreambleConditionalStack(ConditionalStack);
ConditionalStack.clear();
}
diff --git a/tools/clang/lib/Lex/PPLexerChange.cpp b/tools/clang/lib/Lex/PPLexerChange.cpp
index 849a703671..e2eceafd98 100644
--- a/tools/clang/lib/Lex/PPLexerChange.cpp
+++ b/tools/clang/lib/Lex/PPLexerChange.cpp
@@ -46,12 +46,6 @@ bool Preprocessor::isInPrimaryFile() const {
return true;
}
-bool Preprocessor::isInMainFile() const {
- if (IsFileLexer())
- return IncludeMacroStack.size() == 0;
- return true;
-}
-
/// getCurrentLexer - Return the current file lexer being lexed from. Note
/// that this ignores any potentially active macro expansions and _Pragma
/// expansions going on at the time.
diff --git a/tools/clang/lib/Lex/Preprocessor.cpp b/tools/clang/lib/Lex/Preprocessor.cpp
index 1da60961a8..bb67b9c77a 100644
--- a/tools/clang/lib/Lex/Preprocessor.cpp
+++ b/tools/clang/lib/Lex/Preprocessor.cpp
@@ -531,7 +531,9 @@ void Preprocessor::EnterMainSourceFile() {
// Start parsing the predefines.
EnterSourceFile(FID, nullptr, SourceLocation());
+}
+void Preprocessor::replayPreambleConditionalStack() {
// Restore the conditional stack from the preamble, if there is one.
if (PreambleConditionalStack.isReplaying()) {
CurPPLexer->setConditionalLevels(PreambleConditionalStack.getStack());
diff --git a/tools/clang/lib/Parse/Parser.cpp b/tools/clang/lib/Parse/Parser.cpp
index f968f995d5..45662e7866 100644
--- a/tools/clang/lib/Parse/Parser.cpp
+++ b/tools/clang/lib/Parse/Parser.cpp
@@ -528,6 +528,8 @@ void Parser::Initialize() {
// Prime the lexer look-ahead.
ConsumeToken();
+
+ PP.replayPreambleConditionalStack();
}
void Parser::LateTemplateParserCleanupCallback(void *P) {
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index b935cbf1ae7..3c9a25062f5 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -286,6 +286,11 @@ static bool shouldUseMmap(int FD,
bool RequiresNullTerminator,
int PageSize,
bool IsVolatileSize) {
+#ifdef _WIN32
+ // Do not use mmap on Windows in order to avoid file locking
+ return false;
+#endif
+
// mmap may leave the buffer without null terminator if the file size changed
// by the time the last page is mapped in, so avoid it if the file size is
// likely to change.