From da54b1e6a9d551c099ccf171ad1a03ea598ac99f Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 17 Nov 2016 11:56:02 +0100 Subject: [PATCH] Clang: Tests: Fix compilation refactoringclient-test.cpp:126:76: error: no matching function for call to 'ClangRefactoring::RefactoringCompilerOptionsBuilder::build(CppTools::ProjectPart*, CppTools::ProjectFile::Kind&)' Broke with: commit 36d4d01cd374a21a8b7c229b261c5f1a23d1184e Clang: Take precompiled headers into account when parsing source files Change-Id: I7c5a2edec0859584ea2b33e144178060788cd4d9 Reviewed-by: Marco Bubke --- tests/unit/mockup/cpptools/cpptoolsreuse.h | 32 +++++++++++++++++++ .../unit/unittest/refactoringclient-test.cpp | 3 +- .../unit/unittest/refactoringengine-test.cpp | 3 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tests/unit/mockup/cpptools/cpptoolsreuse.h diff --git a/tests/unit/mockup/cpptools/cpptoolsreuse.h b/tests/unit/mockup/cpptools/cpptoolsreuse.h new file mode 100644 index 00000000000..fec53886417 --- /dev/null +++ b/tests/unit/mockup/cpptools/cpptoolsreuse.h @@ -0,0 +1,32 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +namespace CppTools { + +CompilerOptionsBuilder::PchUsage getPchUsage() { return CompilerOptionsBuilder::PchUsage::None; } + +} // CppTools diff --git a/tests/unit/unittest/refactoringclient-test.cpp b/tests/unit/unittest/refactoringclient-test.cpp index 6badbee3c60..69b8259e1be 100644 --- a/tests/unit/unittest/refactoringclient-test.cpp +++ b/tests/unit/unittest/refactoringclient-test.cpp @@ -123,7 +123,8 @@ void RefactoringClient::SetUp() projectPart->files.push_back(projectFile); commandLine = RefactoringCompilerOptionsBuilder::build(projectPart.data(), - projectFile.kind); + projectFile.kind, + RefactoringCompilerOptionsBuilder::PchUsage::None); } } diff --git a/tests/unit/unittest/refactoringengine-test.cpp b/tests/unit/unittest/refactoringengine-test.cpp index e295ac34f1a..6efbebfb41f 100644 --- a/tests/unit/unittest/refactoringengine-test.cpp +++ b/tests/unit/unittest/refactoringengine-test.cpp @@ -108,7 +108,8 @@ void RefactoringEngine::SetUp() projectPart->files.push_back(projectFile); commandLine = RefactoringCompilerOptionsBuilder::build(projectPart.data(), - projectFile.kind); + projectFile.kind, + RefactoringCompilerOptionsBuilder::PchUsage::None); commandLine.push_back(qStringFilePath); }