diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2022-10-20 16:01:06 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2022-10-24 11:43:21 +0000 |
commit | 8662470aba117c491f67e84adfc5f9d4dda107b5 (patch) | |
tree | 093fb2df3173d692fcb53df3e729ff630755ed7d /src/libs/3rdparty/cplusplus/Parser.cpp | |
parent | 5316a8f799eb8f3011799801a68c70cb522d7cd6 (diff) |
CPlusPlus: Allow " = default" also on function implementations
Note that we only make sure not to trip over valid code; we make no
effort to check whether default/delete is actually allowed at this
type of declaration.
Fixes: QTCREATORBUG-28102
Change-Id: Ic693319b9dfaf8652cf4cae9cd907a6e258ad773
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Parser.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp index d5aa3e4e29..430b19efbe 100644 --- a/src/libs/3rdparty/cplusplus/Parser.cpp +++ b/src/libs/3rdparty/cplusplus/Parser.cpp @@ -2798,7 +2798,7 @@ bool Parser::parseInitDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_sp return true; } rewind(colon_token); - } else if (isFunctionDeclarator && declaringClass && node->core_declarator && LA() == T_EQUAL && LA(3) == T_SEMICOLON) { // = 0, = delete, = default + } else if (isFunctionDeclarator && node->core_declarator && LA() == T_EQUAL && LA(3) == T_SEMICOLON) { // = 0, = delete, = default if (!_languageFeatures.cxx11Enabled || LA(2) == T_NUMERIC_LITERAL) { parseInitializer(node->initializer, &node->equal_token); } else { |