forked from qt-creator/qt-creator
CppEditor: Fix "move function definition"
... for member functions with exception specification and/or reference qualifiers. The FunctionDeclaratorAST::cv_qualifier_list member can contain both the proper qualifiers "const" and "volatile" as well as the pseudo-qualifiers "override" and "final". The problem is that the former appear before exception specification and reference qualifiers, whereas the latter come afterwards. Therefore, when calculating the declarator's first and last tokens, we can't just mechanically check the different declarator members in order. Instead, we need to compare the token values to see which comes first. Task-number: QTCREATORBUG-27132 Change-Id: I924f9afe49453fa51b4a2fe010d1cc00c9defad1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -192,6 +192,7 @@ private slots:
|
||||
void testMoveFuncDefOutsideUnnamedTemplate();
|
||||
void testMoveFuncDefOutsideMemberFuncToCppStatic();
|
||||
void testMoveFuncDefOutsideMemberFuncToCppWithInlinePartOfName();
|
||||
void testMoveFuncDefOutsideMixedQualifiers();
|
||||
|
||||
void testMoveAllFuncDefOutsideMemberFuncToCpp();
|
||||
void testMoveAllFuncDefOutsideMemberFuncOutside();
|
||||
|
||||
Reference in New Issue
Block a user