Browse Source

[cpp] Don't emit a line change on the first line of a function

hughsando 8 years ago
parent
commit
56f1841910
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/generators/gencpp.ml

+ 1 - 1
src/generators/gencpp.ml

@@ -3254,7 +3254,7 @@ let gen_cpp_ast_expression_tree ctx class_name func_name function_args function_
          List.iter gen_closure closures;
          List.iter gen_closure closures;
          (match injection with Some inject -> inject.inj_prologue gc_stack | _ -> () );
          (match injection with Some inject -> inject.inj_prologue gc_stack | _ -> () );
          let remaining = ref (List.length exprs) in
          let remaining = ref (List.length exprs) in
-         lastLine := -1;
+         lastLine := Lexer.get_error_line tree.epos;
          List.iter (fun e ->
          List.iter (fun e ->
             output_p e "";
             output_p e "";
             if (!remaining=1) then
             if (!remaining=1) then