CppEditor: Fix stack overflow in quick fixes
CppEditor: Fix stack overflow in quick fixes

The MoveDeclarationOutOfIf quick fix modified a IfStatementAST in case
there were several such ASTs in interface->path(). The resulting AST was
invalid (else_statement was pointing to 'this' afterwards), thus the
afterwards executed PointerDeclarationFormatter (an ASTVisitor) was not
able to finish his visit.

The actual problem was that op->pattern in the match() calls was not
reset.

Task-number: QTCREATORBUG-10919
Change-Id: Ifbcac73e75690321ef45b6d8c2dc32fcea236efa
Reviewed-by: Erik Verbruggen <5edfe905d082749f2ac3f4e6b42937f39f083771@digia.com>

martyone/sailfish-qtcreator,kuba1/qtcreator,Distrotech/qtcreator,danimo/qt-creator,xianian/qt-creator,omniacreator/qtcreator,amyvmiwei/qt-creator,darksylinc/qt-creator,farseerri/git_code,darksylinc/qt-creator,AltarBeastiful/qt-creator,xianian/qt-creator,amyvmiwei/qt-creator,farseerri/git_code,colede/qtcreator,AltarBeastiful/qt-creator,AltarBeastiful/qt-creator,farseerri/git_code,omniacreator/qtcreator,maui-packages/qt-creator,maui-packages/qt-creator,danimo/qt-creator,maui-packages/qt-creator,AltarBeastiful/qt-creator,darksylinc/qt-creator,martyone/sailfish-qtcreator,darksylinc/qt-creator,xianian/qt-creator,darksylinc/qt-creator,maui-packages/qt-creator,colede/qtcreator,colede/qtcreator,farseerri/git_code,xianian/qt-creator,AltarBeastiful/qt-creator,colede/qtcreator,xianian/qt-creator,AltarBeastiful/qt-creator,colede/qtcreator,colede/qtcreator,Distrotech/qtcreator,martyone/sailfish-qtcreator,colede/qtcreator,omniacreator/qtcreator,omniacreator/qtcreator,kuba1/qtcreator,maui-packages/qt-creator,kuba1/qtcreator,martyone/sailfish-qtcreator,darksylinc/qt-creator,danimo/qt-creator,danimo/qt-creator,Distrotech/qtcreator,amyvmiwei/qt-creator,farseerri/git_code,xianian/qt-creator,xianian/qt-creator,Distrotech/qtcreator,omniacreator/qtcreator,amyvmiwei/qt-creator,danimo/qt-creator,kuba1/qtcreator,farseerri/git_code,danimo/qt-creator,danimo/qt-creator,AltarBeastiful/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,amyvmiwei/qt-creator,danimo/qt-creator,kuba1/qtcreator,AltarBeastiful/qt-creator,amyvmiwei/qt-creator,xianian/qt-creator,maui-packages/qt-creator,omniacreator/qtcreator,kuba1/qtcreator,Distrotech/qtcreator,amyvmiwei/qt-creator,kuba1/qtcreator,omniacreator/qtcreator,kuba1/qtcreator,farseerri/git_code,darksylinc/qt-creator,amyvmiwei/qt-creator,kuba1/qtcreator,Distrotech/qtcreator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,darksylinc/qt-creator,maui-packages/qt-creator,martyone/sailfish-qtcreator,Distrotech/qtcreator,farseerri/git_code,danimo/qt-creator