data, utility: Fixes to run Opensource Projects

templateSpecializationArgsAsWritten returning null caused a crash
VisitMemberExprInDeclBody for vardecl was missing
subdirectories for headersearchpaths, that the user does not need to add a hugh amount of folders
This commit is contained in:
Andreas Stallinger
2015-09-16 17:08:16 +02:00
parent fb5316cb7f
commit 73b1b77ca8
14 changed files with 110 additions and 16 deletions
+11 -1
View File
@@ -9,6 +9,7 @@
#include "data/parser/cxx/TaskParseCxx.h"
#include "settings/ApplicationSettings.h"
#include "settings/ProjectSettings.h"
#include "utility/file/FileSystem.h"
std::shared_ptr<Project> Project::create(StorageAccessProxy* storageAccessProxy)
{
@@ -146,7 +147,16 @@ Parser::Arguments Project::getParserArguments() const
// Add the include paths as HeaderSearchPaths as well, so clang will also look here when searching include files.
utility::append(args.systemHeaderSearchPaths, m_fileManager.getIncludePaths());
utility::append(args.systemHeaderSearchPaths, projSettings->getHeaderSearchPaths());
std::vector<FilePath> headerSearchPaths;
for(FilePath p : projSettings->getHeaderSearchPaths())
{
std::vector<FilePath> tempPaths = FileSystem::getSubDirectoies(p);
headerSearchPaths.insert( headerSearchPaths.end(), tempPaths.begin(), tempPaths.end() );
}
std::unique(headerSearchPaths.begin(),headerSearchPaths.end());
utility::append(args.systemHeaderSearchPaths, headerSearchPaths);
utility::append(args.systemHeaderSearchPaths, appSettings->getHeaderSearchPaths());
utility::append(args.frameworkSearchPaths, projSettings->getFrameworkSearchPaths());