diff --git a/tests/manual/cplusplus-frontend/main.cpp b/tests/manual/cplusplus-frontend/main.cpp index 32f106d3ad6..bf5db684508 100644 --- a/tests/manual/cplusplus-frontend/main.cpp +++ b/tests/manual/cplusplus-frontend/main.cpp @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) Document::Ptr doc = Document::create(fileName); doc->control()->setDiagnosticClient(0); - doc->setSource(source); + doc->setUtf8Source(source); doc->parse(); } diff --git a/tests/tools/cplusplus-dump/dumpers.inc b/tests/tools/cplusplus-dump/dumpers.inc index fe7fae5a834..4caf1120c05 100644 --- a/tests/tools/cplusplus-dump/dumpers.inc +++ b/tests/tools/cplusplus-dump/dumpers.inc @@ -1,34 +1,22 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** -** GNU Lesser General Public License Usage -** -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this file. -** Please review the following information to ensure the GNU Lesser General -** Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** Other Usage -** -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -**************************************************************************/ +// Copyright (c) 2008 Roberto Raggi +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // // W A R N I N G @@ -576,7 +564,7 @@ virtual bool visit(ExceptionDeclarationAST *ast) return false; } -virtual bool visit(ExceptionSpecificationAST *ast) +virtual bool visit(DynamicExceptionSpecificationAST *ast) { if (ast->throw_token) terminal(ast->throw_token, ast); @@ -591,6 +579,18 @@ virtual bool visit(ExceptionSpecificationAST *ast) return false; } +virtual bool visit(NoExceptSpecificationAST *ast) +{ + if (ast->noexcept_token) + terminal(ast->noexcept_token, ast); + if (ast->lparen_token) + terminal(ast->lparen_token, ast); + nonterminal(ast->expression); + if (ast->rparen_token) + terminal(ast->rparen_token, ast); + return false; +} + virtual bool visit(ExpressionOrDeclarationStatementAST *ast) { nonterminal(ast->expression); @@ -794,6 +794,8 @@ virtual bool visit(TemplateIdAST *ast) virtual bool visit(NamespaceAST *ast) { + if (ast->inline_token) + terminal(ast->inline_token, ast); if (ast->namespace_token) terminal(ast->namespace_token, ast); if (ast->identifier_token) @@ -1071,6 +1073,13 @@ virtual bool visit(SizeofExpressionAST *ast) return false; } +virtual bool visit(PointerLiteralAST *ast) +{ + if (ast->literal_token) + terminal(ast->literal_token, ast); + return false; +} + virtual bool visit(NumericLiteralAST *ast) { if (ast->literal_token) @@ -1102,6 +1111,23 @@ virtual bool visit(NestedExpressionAST *ast) return false; } +virtual bool visit(StaticAssertDeclarationAST *ast) +{ + if (ast->static_assert_token) + terminal(ast->static_assert_token, ast); + if (ast->lparen_token) + terminal(ast->lparen_token, ast); + nonterminal(ast->expression); + if (ast->comma_token) + terminal(ast->comma_token, ast); + nonterminal(ast->string_literal); + if (ast->rparen_token) + terminal(ast->rparen_token, ast); + if (ast->semicolon_token) + terminal(ast->semicolon_token, ast); + return false; +} + virtual bool visit(StringLiteralAST *ast) { if (ast->literal_token) @@ -1575,7 +1601,7 @@ virtual bool visit(LambdaCaptureAST *ast) return false; } -virtual bool visit(CaptureAST *) +virtual bool visit(CaptureAST *ast) { return false; } diff --git a/tests/tools/cplusplus-dump/main.cpp b/tests/tools/cplusplus-dump/main.cpp index aeeac44a83f..15eb316bd86 100644 --- a/tests/tools/cplusplus-dump/main.cpp +++ b/tests/tools/cplusplus-dump/main.cpp @@ -374,7 +374,7 @@ int main(int argc, char *argv[]) Document::Ptr doc = Document::create(fileName); doc->control()->setDiagnosticClient(0); - doc->setSource(source); + doc->setUtf8Source(source); doc->parse(); doc->check();