From 1d30c09bd1d37b2ea76f3ef4519ee6b27cbda099 Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Fri, 13 Aug 2010 13:47:39 +0200
Subject: [PATCH] Update the function's source location.

---
 src/shared/cplusplus/Bind.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp
index d4a4add188e..752cd32ed6c 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
-- 
GitLab