From a33842cf06353498e8a0e668458f5b2d477ff45b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 11 Aug 2008 16:07:55 +0300 Subject: [PATCH] Update the line number at the very start of the function. Otherwise it was just getting updated at the first expression. Signed-off-by: Dan Carpenter --- smatch_flow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/smatch_flow.c b/smatch_flow.c index c984f61e..8cd64799 100644 --- a/smatch_flow.c +++ b/smatch_flow.c @@ -478,6 +478,7 @@ static void split_functions(struct symbol_list *sym_list) line_func_start = base_type->stmt->pos.line; if (sym->ident) cur_func = sym->ident->name; + __smatch_lineno = sym->pos.line; __pass_to_client(sym, FUNC_DEF_HOOK); split_statements(base_type->stmt); __pass_to_client(sym, END_FUNC_HOOK); -- 2.11.4.GIT