data: lambda handling

* implemented handling lambdas as functions
* functions can have child nodes now
* NameElements in NameHierarchy can have signatures now.
* fixed crash that occurred when message listener was used while being half way through its destruction process.
This commit is contained in:
malte_langkabel
2015-12-10 18:00:54 +01:00
parent 2b03215ea4
commit 01bcf7266b
22 changed files with 238 additions and 568 deletions
+11 -2
View File
@@ -166,6 +166,15 @@ bool ASTVisitor::VisitFunctionDecl(clang::FunctionDecl* declaration)
return true;
}
bool ASTVisitor::VisitLambdaExpr(clang::LambdaExpr* expr)
{
if (isLocatedInUnparsedProjectFile(expr->getCallOperator()))
{
processFunctionDecl(expr->getCallOperator());
}
return true;
}
bool ASTVisitor::VisitParmVarDecl(clang::ParmVarDecl* declaration)
{
// todo: handle parameters here!
@@ -755,7 +764,7 @@ void ASTVisitor::processFunctionDecl(clang::FunctionDecl* declaration)
getParseLocationForNamedDecl(declaration),
getParseFunction(declaration),
getParseLocationOfFunctionBody(declaration)
);
);
// handle template arguments of return type.
clang::TypeLoc functionLoc = declaration->getTypeSourceInfo()->getTypeLoc();
@@ -772,7 +781,7 @@ void ASTVisitor::processFunctionDecl(clang::FunctionDecl* declaration)
if (declaration->hasBody() &&
declaration->isThisDeclarationADefinition() &&
!declaration->isDependentContext()
)
)
{
ASTBodyVisitor bodyVisitor(this, declaration);
bodyVisitor.Visit(declaration->getBody());