Commit 5e8e619d authored by Orgad Shaneh's avatar Orgad Shaneh

Merge remote-tracking branch 'origin/4.4' into 4.5

Change-Id: I9b7cb3d845628abf69a73a279f5a79202c0976c2
parents 2966b734 6afdb8bd
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)
......@@ -4,6 +4,8 @@ import qbs.FileInfo
Module {
Depends { name: "qtc" }
property bool priority: 1 // TODO: Remove declaration after 1.11 is out.
property bool enableUnitTests: false
property bool enableProjectFileUpdates: true
property bool installApiHeaders: false
......
......@@ -67,6 +67,7 @@ source_include_patterns = [
r"^doc/.*$", # include everything under doc/
r"^.*\.pri$", # .pri files in all directories that are looked into
r"^.*\.h$", # .h files in all directories that are looked into
r"^.*\.hpp$" # .hpp files in all directories that are looked into
]
build_include_patterns = [
......
......@@ -321,7 +321,7 @@ private:
inline int consumeToken() {
if (_index < int(_tokens.size()))
return _index++;
return _tokens.size() - 1;
return static_cast<int>(_tokens.size()) - 1;
}
inline const Token &tokenAt(int index) const {
if (index == 0)
......@@ -468,30 +468,30 @@ Parser::Parser(Engine *engine, const char *source, unsigned size, int variant)
switch (tk.kind) {
case T_LEFT_PAREN:
parenStack.push(_tokens.size());
parenStack.push(static_cast<int>(_tokens.size()));
break;
case T_LEFT_BRACKET:
bracketStack.push(_tokens.size());
bracketStack.push(static_cast<int>(_tokens.size()));
break;
case T_LEFT_BRACE:
braceStack.push(_tokens.size());
braceStack.push(static_cast<int>(_tokens.size()));
break;
case T_RIGHT_PAREN:
if (! parenStack.empty()) {
_tokens[parenStack.top()].matchingBrace = _tokens.size();
_tokens[parenStack.top()].matchingBrace = static_cast<int>(_tokens.size());
parenStack.pop();
}
break;
case T_RIGHT_BRACKET:
if (! bracketStack.empty()) {
_tokens[bracketStack.top()].matchingBrace = _tokens.size();
_tokens[bracketStack.top()].matchingBrace = static_cast<int>(_tokens.size());
bracketStack.pop();
}
break;
case T_RIGHT_BRACE:
if (! braceStack.empty()) {
_tokens[braceStack.top()].matchingBrace = _tokens.size();
_tokens[braceStack.top()].matchingBrace = static_cast<int>(_tokens.size());
braceStack.pop();
}
break;
......@@ -519,9 +519,13 @@ AST *Parser::parse(int startToken)
_recovered = false;
_tos = -1;
_startToken.kind = startToken;
int recoveryAttempts = 0;
do {
again:
recoveryAttempts = 0;
againAfterRecovery:
if (unsigned(++_tos) == _stateStack.size()) {
_stateStack.resize(_tos * 2);
_locationStack.resize(_tos * 2);
......@@ -564,6 +568,7 @@ AST *Parser::parse(int startToken)
reduce(ruleno);
action = nt_action(_stateStack[_tos], lhs[ruleno] - TERMINAL_COUNT);
} else if (action == 0) {
++recoveryAttempts;
const int line = _tokens[yyloc].line + 1;
QString message = QLatin1String("Syntax error");
if (yytoken != -1) {
......@@ -574,7 +579,7 @@ AST *Parser::parse(int startToken)
for (; _tos; --_tos) {
const int state = _stateStack[_tos];
static int tks[] = {
static int tks1[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
......@@ -582,6 +587,16 @@ AST *Parser::parse(int startToken)
T_WHILE,
0
};
static int tks2[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
0
};
int *tks;
if (recoveryAttempts < 2)
tks = tks1;
else
tks = tks2; // Avoid running into an endless loop for e.g.: for(int x=0; x y
for (int *tptr = tks; *tptr; ++tptr) {
const int next = t_action(state, *tptr);
......@@ -604,7 +619,7 @@ AST *Parser::parse(int startToken)
yytoken = -1;
action = next;
goto again;
goto againAfterRecovery;
}
}
}
......
#line 423 "./glsl.g"
#line 413 "./glsl.g"
/****************************************************************************
**
......@@ -109,9 +109,13 @@ AST *Parser::parse(int startToken)
_recovered = false;
_tos = -1;
_startToken.kind = startToken;
int recoveryAttempts = 0;
do {
again:
recoveryAttempts = 0;
againAfterRecovery:
if (unsigned(++_tos) == _stateStack.size()) {
_stateStack.resize(_tos * 2);
_locationStack.resize(_tos * 2);
......@@ -154,6 +158,7 @@ AST *Parser::parse(int startToken)
reduce(ruleno);
action = nt_action(_stateStack[_tos], lhs[ruleno] - TERMINAL_COUNT);
} else if (action == 0) {
++recoveryAttempts;
const int line = _tokens[yyloc].line + 1;
QString message = QLatin1String("Syntax error");
if (yytoken != -1) {
......@@ -164,7 +169,7 @@ AST *Parser::parse(int startToken)
for (; _tos; --_tos) {
const int state = _stateStack[_tos];
static int tks[] = {
static int tks1[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
......@@ -172,6 +177,16 @@ AST *Parser::parse(int startToken)
T_WHILE,
0
};
static int tks2[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
0
};
int *tks;
if (recoveryAttempts < 2)
tks = tks1;
else
tks = tks2; // Avoid running into an endless loop for e.g.: for(int x=0; x y
for (int *tptr = tks; *tptr; ++tptr) {
const int next = t_action(state, *tptr);
......@@ -194,7 +209,7 @@ AST *Parser::parse(int startToken)
yytoken = -1;
action = next;
goto again;
goto againAfterRecovery;
}
}
}
......
#line 215 "./glsl.g"
#line 210 "./glsl.g"
/****************************************************************************
**
......
This diff is collapsed.
......@@ -3,8 +3,9 @@
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
......@@ -21,6 +22,8 @@
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
//
......@@ -35,231 +38,234 @@
//
// This file was generated by qlalr - DO NOT EDIT!
#pragma once
#ifndef GLSLPARSERTABLE_P_H
#define GLSLPARSERTABLE_P_H
#include <qglobal.h>
#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
class GLSLParserTable
{
public:
enum VariousConstants {
EOF_SYMBOL = 0,
T_ADD_ASSIGN = 3,
T_AMPERSAND = 4,
T_AND_ASSIGN = 5,
T_AND_OP = 6,
T_ATTRIBUTE = 7,
T_BANG = 8,
T_BOOL = 9,
T_BREAK = 10,
T_BVEC2 = 11,
T_BVEC3 = 12,
T_BVEC4 = 13,
T_CARET = 14,
T_CASE = 15,
T_CENTROID = 16,
T_COLON = 17,
T_COMMA = 18,
T_COMMENT = 172,
T_CONST = 19,
T_CONTINUE = 20,
T_DASH = 21,
T_DEC_OP = 22,
T_DEFAULT = 23,
T_DISCARD = 24,
T_DIV_ASSIGN = 25,
T_DMAT2 = 26,
T_DMAT2X2 = 27,
T_DMAT2X3 = 28,
T_DMAT2X4 = 29,
T_DMAT3 = 30,
T_DMAT3X2 = 31,
T_DMAT3X3 = 32,
T_DMAT3X4 = 33,
T_DMAT4 = 34,
T_DMAT4X2 = 35,
T_DMAT4X3 = 36,
T_DMAT4X4 = 37,
T_DO = 38,
T_DOT = 39,
T_DOUBLE = 40,
T_DVEC2 = 41,
T_DVEC3 = 42,
T_DVEC4 = 43,
T_ELSE = 44,
T_EQUAL = 45,
T_EQ_OP = 46,
T_ERROR = 173,
T_FALSE = 170,
T_FEED_EXPRESSION = 2,
T_FEED_GLSL = 1,
T_FLAT = 47,
T_FLOAT = 48,
T_FOR = 49,
T_GE_OP = 50,
T_HIGHP = 51,
T_IDENTIFIER = 52,
T_IF = 53,
T_IN = 54,
T_INC_OP = 55,
T_INOUT = 56,
T_INT = 57,
T_INVARIANT = 58,
T_ISAMPLER1D = 59,
T_ISAMPLER1DARRAY = 60,
T_ISAMPLER2D = 61,
T_ISAMPLER2DARRAY = 62,
T_ISAMPLER2DMS = 63,
T_ISAMPLER2DMSARRAY = 64,
T_ISAMPLER2DRECT = 65,
T_ISAMPLER3D = 66,
T_ISAMPLERBUFFER = 67,
T_ISAMPLERCUBE = 68,
T_ISAMPLERCUBEARRAY = 69,
T_IVEC2 = 70,
T_IVEC3 = 71,
T_IVEC4 = 72,
T_LAYOUT = 73,
T_LEFT_ANGLE = 74,
T_LEFT_ASSIGN = 75,
T_LEFT_BRACE = 76,
T_LEFT_BRACKET = 77,
T_LEFT_OP = 78,
T_LEFT_PAREN = 79,
T_LE_OP = 80,
T_LOWP = 81,
T_MAT2 = 82,
T_MAT2X2 = 83,
T_MAT2X3 = 84,
T_MAT2X4 = 85,
T_MAT3 = 86,
T_MAT3X2 = 87,
T_MAT3X3 = 88,
T_MAT3X4 = 89,
T_MAT4 = 90,
T_MAT4X2 = 91,
T_MAT4X3 = 92,
T_MAT4X4 = 93,
T_MEDIUMP = 94,
T_MOD_ASSIGN = 95,
T_MUL_ASSIGN = 96,
T_NE_OP = 97,
T_NOPERSPECTIVE = 98,
T_NUMBER = 99,
T_OR_ASSIGN = 100,
T_OR_OP = 101,
T_OUT = 102,
T_PATCH = 103,
T_PERCENT = 104,
T_PLUS = 105,
T_PRECISION = 106,
T_PREPROC = 171,
T_QUESTION = 107,
T_RESERVED = 174,
T_RETURN = 108,
T_RIGHT_ANGLE = 109,
T_RIGHT_ASSIGN = 110,
T_RIGHT_BRACE = 111,
T_RIGHT_BRACKET = 112,
T_RIGHT_OP = 113,
T_RIGHT_PAREN = 114,
T_SAMPLE = 115,
T_SAMPLER1D = 116,
T_SAMPLER1DARRAY = 117,
T_SAMPLER1DARRAYSHADOW = 118,
T_SAMPLER1DSHADOW = 119,
T_SAMPLER2D = 120,
T_SAMPLER2DARRAY = 121,
T_SAMPLER2DARRAYSHADOW = 122,
T_SAMPLER2DMS = 123,
T_SAMPLER2DMSARRAY = 124,
T_SAMPLER2DRECT = 125,
T_SAMPLER2DRECTSHADOW = 126,
T_SAMPLER2DSHADOW = 127,
T_SAMPLER3D = 128,
T_SAMPLERBUFFER = 129,
T_SAMPLERCUBE = 130,
T_SAMPLERCUBEARRAY = 131,
T_SAMPLERCUBEARRAYSHADOW = 132,
T_SAMPLERCUBESHADOW = 133,
T_SEMICOLON = 134,
T_SLASH = 135,
T_SMOOTH = 136,
T_STAR = 137,
T_STRUCT = 138,
T_SUBROUTINE = 139,
T_SUB_ASSIGN = 140,
T_SWITCH = 141,
T_TILDE = 142,
T_TRUE = 169,
T_TYPE_NAME = 143,
T_UINT = 144,
T_UNIFORM = 145,
T_USAMPLER1D = 146,
T_USAMPLER1DARRAY = 147,
T_USAMPLER2D = 148,
T_USAMPLER2DARRAY = 149,
T_USAMPLER2DMS = 150,
T_USAMPLER2DMSARRAY = 151,
T_USAMPLER2DRECT = 152,
T_USAMPLER3D = 153,
T_USAMPLERBUFFER = 154,
T_USAMPLERCUBE = 155,
T_USAMPLERCUBEARRAY = 156,
T_UVEC2 = 157,
T_UVEC3 = 158,
T_UVEC4 = 159,
T_VARYING = 160,
T_VEC2 = 161,
T_VEC3 = 162,
T_VEC4 = 163,
T_VERTICAL_BAR = 164,
T_VOID = 165,
T_WHILE = 166,
T_XOR_ASSIGN = 167,
T_XOR_OP = 168,
enum VariousConstants {
EOF_SYMBOL = 0,
T_ADD_ASSIGN = 3,
T_AMPERSAND = 4,
T_AND_ASSIGN = 5,
T_AND_OP = 6,
T_ATTRIBUTE = 7,
T_BANG = 8,
T_BOOL = 9,
T_BREAK = 10,
T_BVEC2 = 11,
T_BVEC3 = 12,
T_BVEC4 = 13,
T_CARET = 14,
T_CASE = 15,
T_CENTROID = 16,
T_COLON = 17,
T_COMMA = 18,
T_COMMENT = 172,
T_CONST = 19,
T_CONTINUE = 20,
T_DASH = 21,
T_DEC_OP = 22,
T_DEFAULT = 23,
T_DISCARD = 24,
T_DIV_ASSIGN = 25,
T_DMAT2 = 26,
T_DMAT2X2 = 27,
T_DMAT2X3 = 28,
T_DMAT2X4 = 29,
T_DMAT3 = 30,
T_DMAT3X2 = 31,
T_DMAT3X3 = 32,
T_DMAT3X4 = 33,
T_DMAT4 = 34,
T_DMAT4X2 = 35,
T_DMAT4X3 = 36,
T_DMAT4X4 = 37,
T_DO = 38,
T_DOT = 39,
T_DOUBLE = 40,
T_DVEC2 = 41,
T_DVEC3 = 42,
T_DVEC4 = 43,
T_ELSE = 44,
T_EQUAL = 45,
T_EQ_OP = 46,
T_ERROR = 173,
T_FALSE = 170,
T_FEED_EXPRESSION = 2,
T_FEED_GLSL = 1,
T_FLAT = 47,
T_FLOAT = 48,
T_FOR = 49,
T_GE_OP = 50,
T_HIGHP = 51,
T_IDENTIFIER = 52,
T_IF = 53,
T_IN = 54,
T_INC_OP = 55,
T_INOUT = 56,
T_INT = 57,
T_INVARIANT = 58,
T_ISAMPLER1D = 59,
T_ISAMPLER1DARRAY = 60,
T_ISAMPLER2D = 61,
T_ISAMPLER2DARRAY = 62,
T_ISAMPLER2DMS = 63,
T_ISAMPLER2DMSARRAY = 64,
T_ISAMPLER2DRECT = 65,
T_ISAMPLER3D = 66,
T_ISAMPLERBUFFER = 67,
T_ISAMPLERCUBE = 68,
T_ISAMPLERCUBEARRAY = 69,
T_IVEC2 = 70,
T_IVEC3 = 71,
T_IVEC4 = 72,
T_LAYOUT = 73,
T_LEFT_ANGLE = 74,
T_LEFT_ASSIGN = 75,
T_LEFT_BRACE = 76,
T_LEFT_BRACKET = 77,
T_LEFT_OP = 78,
T_LEFT_PAREN = 79,
T_LE_OP = 80,
T_LOWP = 81,
T_MAT2 = 82,
T_MAT2X2 = 83,
T_MAT2X3 = 84,
T_MAT2X4 = 85,
T_MAT3 = 86,
T_MAT3X2 = 87,
T_MAT3X3 = 88,
T_MAT3X4 = 89,
T_MAT4 = 90,
T_MAT4X2 = 91,
T_MAT4X3 = 92,
T_MAT4X4 = 93,
T_MEDIUMP = 94,
T_MOD_ASSIGN = 95,
T_MUL_ASSIGN = 96,
T_NE_OP = 97,
T_NOPERSPECTIVE = 98,
T_NUMBER = 99,
T_OR_ASSIGN = 100,
T_OR_OP = 101,
T_OUT = 102,
T_PATCH = 103,
T_PERCENT = 104,
T_PLUS = 105,
T_PRECISION = 106,
T_PREPROC = 171,
T_QUESTION = 107,
T_RESERVED = 174,
T_RETURN = 108,
T_RIGHT_ANGLE = 109,
T_RIGHT_ASSIGN = 110,
T_RIGHT_BRACE = 111,
T_RIGHT_BRACKET = 112,
T_RIGHT_OP = 113,
T_RIGHT_PAREN = 114,
T_SAMPLE = 115,
T_SAMPLER1D = 116,
T_SAMPLER1DARRAY = 117,
T_SAMPLER1DARRAYSHADOW = 118,
T_SAMPLER1DSHADOW = 119,
T_SAMPLER2D = 120,
T_SAMPLER2DARRAY = 121,
T_SAMPLER2DARRAYSHADOW = 122,
T_SAMPLER2DMS = 123,
T_SAMPLER2DMSARRAY = 124,
T_SAMPLER2DRECT = 125,
T_SAMPLER2DRECTSHADOW = 126,
T_SAMPLER2DSHADOW = 127,
T_SAMPLER3D = 128,
T_SAMPLERBUFFER = 129,
T_SAMPLERCUBE = 130,
T_SAMPLERCUBEARRAY = 131,
T_SAMPLERCUBEARRAYSHADOW = 132,
T_SAMPLERCUBESHADOW = 133,
T_SEMICOLON = 134,
T_SLASH = 135,
T_SMOOTH = 136,
T_STAR = 137,
T_STRUCT = 138,
T_SUBROUTINE = 139,
T_SUB_ASSIGN = 140,
T_SWITCH = 141,
T_TILDE = 142,
T_TRUE = 169,
T_TYPE_NAME = 143,
T_UINT = 144,