compiler: Improve location info for function parameters.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 14 Jul 2015 00:52:25 +0000 (00:52 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 14 Jul 2015 00:52:25 +0000 (00:52 +0000)
    Previously, errors reported for function parameters would point to the
    beginning of the function declaration instead of to the column for the
    given parameter.

    Reviewed-on: https://go-review.googlesource.com/11580

From-SVN: r225756

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc

index 64924aa8dab14b8f6627762c313dc89a108c1442..b524ce11ba538efc7724c55bdefbbe1f4d69e241 100644 (file)
@@ -1,4 +1,4 @@
-c8cb74e70fbe87b14bbd083730f52a68c79ec6bb
+83191e8e2cb9f47f7c1e6bcb9997f21163292612
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index d7a3651fa321324b4f67a7699776eafea9fb9491..5906b447e15e59a28367b29f71fd27e23e286533 100644 (file)
@@ -1694,7 +1694,7 @@ Gogo::start_function(const std::string& name, Function_type* type,
           ++p)
        {
          Variable* param = new Variable(p->type(), NULL, false, true, false,
-                                        location);
+                                        p->location());
          if (is_varargs && p + 1 == parameters->end())
            param->set_is_varargs_parameter();