data: Added HeaderSearchPaths to Application- and ProjectSettings

This change allows for parsing of a real codebase by specifying the system header search paths in
ApplicationSettings.xml and the additional header search paths in ProjectSettings.xml.

Both settings files are now documented in ApplicationSettings_template.xml and ProjectSettings_template.xml, which show
all possible settings for each file.

This change also fixes some parsing edge cases that occured.
This commit is contained in:
Eberhard Graether
2014-10-07 12:11:48 +02:00
parent d720414467
commit f41e1c429d
23 changed files with 211 additions and 57 deletions
+16 -1
View File
@@ -281,6 +281,12 @@ void ASTVisitor::VisitCallExprInDeclBody(clang::FunctionDecl* decl, clang::CallE
// return nullptr;
if (!expr->getDirectCallee())
{
// TODO: Save error at location.
return;
}
m_client->onCallParsed(
getParseLocation(expr->getSourceRange()),
getParseFunction(decl),
@@ -290,6 +296,12 @@ void ASTVisitor::VisitCallExprInDeclBody(clang::FunctionDecl* decl, clang::CallE
void ASTVisitor::VisitCallExprInDeclBody(clang::VarDecl* decl, clang::CallExpr* expr)
{
if (!expr->getDirectCallee())
{
// TODO: Save error at location.
return;
}
m_client->onCallParsed(
getParseLocation(expr->getSourceRange()),
getParseVariable(decl),
@@ -478,7 +490,10 @@ std::vector<ParseTypeUsage> ASTVisitor::getParameters(clang::FunctionDecl* decla
for (unsigned i = 0; i < declaration->getNumParams(); i++)
{
clang::ParmVarDecl* paramDecl = declaration->getParamDecl(i);
parameters.push_back(getParseTypeUsage(paramDecl->getTypeSourceInfo()->getTypeLoc(), paramDecl->getType()));
if (paramDecl->getTypeSourceInfo())
{
parameters.push_back(getParseTypeUsage(paramDecl->getTypeSourceInfo()->getTypeLoc(), paramDecl->getType()));
}
}
return parameters;