diff options
author | Ian Lance Taylor <iant@google.com> | 2015-07-14 00:52:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2015-07-14 00:52:25 +0000 |
commit | 76165e58a63894e41f0d24996ae8606a8fbbff2d (patch) | |
tree | 3cfa5daf271b2d98807a58f2f814876d2b98f4f0 | |
parent | cc6ec1cec591f3cd396e78cdc3a88057b7ff6ff5 (diff) |
compiler: Improve location info for function parameters.
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
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@225756 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 64924aa8dab..b524ce11ba5 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index d7a3651fa32..5906b447e15 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -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(); |