diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp index d4a4add188e75224f89533f87eb8968c4591c65b..752cd32ed6c9d73f1622b88eb0d4bd701f0b1515 100644 --- a/src/shared/cplusplus/Bind.cpp +++ b/src/shared/cplusplus/Bind.cpp @@ -1805,8 +1805,10 @@ bool Bind::visit(FunctionDefinitionAST *ast) fun->setMethodKey(_methodKey); } - if (declaratorId && declaratorId->name) + if (declaratorId && declaratorId->name) { + fun->setSourceLocation(declaratorId->name->firstToken(), translationUnit()); fun->setName(declaratorId->name->name); + } _scope->addMember(fun); } else