build: different location for clang release libs on UNIX
This change fixes the clang cmake config to use release libs of clang, adds the TicTacToe source files to bin/app/src/ and adds time measuring to the parse call in Project.
This commit is contained in:
+9
-1
@@ -1,7 +1,10 @@
|
||||
#include "Project.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <time.h>
|
||||
|
||||
#include "ApplicationSettings.h"
|
||||
#include "data/access/GraphAccessProxy.h"
|
||||
@@ -49,7 +52,7 @@ bool Project::saveProjectSettings( const std::string& projectSettingsFile )
|
||||
return false;
|
||||
}
|
||||
LOG_INFO_STREAM(<< "Projectsettings saved in File: " << m_projectSettingsFilepath);
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Project::clearProjectSettings()
|
||||
@@ -90,15 +93,20 @@ void Project::parseCode()
|
||||
headerSearchPaths.push_back(sourcePath);
|
||||
|
||||
CxxParser parser(m_storage.get());
|
||||
|
||||
clock_t time = clock();
|
||||
parser.parseFiles(
|
||||
FileSystem::getSourceFilesFromDirectory(sourcePath, extensions),
|
||||
ApplicationSettings::getInstance()->getHeaderSearchPaths(),
|
||||
headerSearchPaths
|
||||
);
|
||||
time = clock() - time;
|
||||
|
||||
m_storage->logGraph();
|
||||
m_storage->logLocations();
|
||||
|
||||
LOG_INFO_STREAM(<< "parse time: " << (double)(time) / CLOCKS_PER_SEC);
|
||||
|
||||
MessageFinishedParsing().dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,14 +581,16 @@ ParseTypeUsage ASTVisitor::getParseTypeUsage(clang::TypeLoc typeLoc, const clang
|
||||
|
||||
ParseTypeUsage ASTVisitor::getParseTypeUsageOfReturnType(clang::FunctionDecl* declaration) const
|
||||
{
|
||||
// TODO: use FunctionDecl::getReturnTypeSourceRange() in newer clang version
|
||||
clang::TypeLoc typeLoc;
|
||||
|
||||
const clang::TypeSourceInfo *TSI = declaration->getTypeSourceInfo();
|
||||
if (TSI)
|
||||
{
|
||||
const clang::FunctionTypeLoc FTL = TSI->getTypeLoc().IgnoreParens().getAs<clang::FunctionTypeLoc>();
|
||||
typeLoc = FTL.getReturnLoc();
|
||||
if (FTL)
|
||||
{
|
||||
typeLoc = FTL.getReturnLoc();
|
||||
}
|
||||
}
|
||||
|
||||
return getParseTypeUsage(typeLoc, declaration->getReturnType());
|
||||
|
||||
Reference in New Issue
Block a user