forked from qt-creator/qt-creator
Add system include path to HeaderPath and merge ProjectPartHeaderPath
System include paths are appended after other includes by the compiler. So we should set them as system includes and not as normal includes. Otherwise we change the include order. Headers in system include paths are not cluttering the screen with unwanted warning and by the way improve performance too. ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them. Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -166,11 +166,11 @@ ClangBackEnd::CompilerMacros ProjectUpdater::createCompilerMacros(const ProjectE
|
||||
}
|
||||
|
||||
Utils::SmallStringVector ProjectUpdater::createIncludeSearchPaths(
|
||||
const CppTools::ProjectPartHeaderPaths &projectPartHeaderPaths)
|
||||
const ProjectExplorer::HeaderPaths &projectPartHeaderPaths)
|
||||
{
|
||||
Utils::SmallStringVector includePaths;
|
||||
|
||||
for (const CppTools::ProjectPartHeaderPath &projectPartHeaderPath : projectPartHeaderPaths) {
|
||||
for (const ProjectExplorer::HeaderPath &projectPartHeaderPath : projectPartHeaderPaths) {
|
||||
if (projectPartHeaderPath.isValid())
|
||||
includePaths.emplace_back(projectPartHeaderPath.path);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <filepathcachinginterface.h>
|
||||
#include <generatedfiles.h>
|
||||
|
||||
#include <projectexplorer/headerpath.h>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Macro;
|
||||
using Macros = QVector<Macro>;
|
||||
@@ -40,8 +42,6 @@ using Macros = QVector<Macro>;
|
||||
namespace CppTools {
|
||||
class ProjectPart;
|
||||
class ProjectFile;
|
||||
class ProjectPartHeaderPath;
|
||||
using ProjectPartHeaderPaths = QVector<ProjectPartHeaderPath>;
|
||||
}
|
||||
|
||||
namespace ClangBackEnd {
|
||||
@@ -90,7 +90,7 @@ unittest_public:
|
||||
static ClangBackEnd::CompilerMacros createCompilerMacros(
|
||||
const ProjectExplorer::Macros &projectMacros);
|
||||
static Utils::SmallStringVector createIncludeSearchPaths(
|
||||
const CppTools::ProjectPartHeaderPaths &projectPartHeaderPaths);
|
||||
const ProjectExplorer::HeaderPaths &projectPartHeaderPaths);
|
||||
static ClangBackEnd::FilePaths createExcludedPaths(
|
||||
const ClangBackEnd::V2::FileContainers &generatedFiles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user