aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/parse.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-09-20 16:46:46 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-09-20 16:46:46 +0000
commit458692b00c947e500d42d2704c3a38604ee6b451 (patch)
treef418101b123973bea669d8eed9ad229dbf0a64be /gcc/go/gofrontend/parse.h
parent40ebf57b67ae30304a7c12fcbac885a8eb6463ce (diff)
downloadgcc-458692b00c947e500d42d2704c3a38604ee6b451.zip
gcc-458692b00c947e500d42d2704c3a38604ee6b451.tar.gz
gcc-458692b00c947e500d42d2704c3a38604ee6b451.tar.bz2
Check for duplicate parameter/result names.
From-SVN: r179010
Diffstat (limited to 'gcc/go/gofrontend/parse.h')
-rw-r--r--gcc/go/gofrontend/parse.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/parse.h b/gcc/go/gofrontend/parse.h
index f072fd3..0da86fb 100644
--- a/gcc/go/gofrontend/parse.h
+++ b/gcc/go/gofrontend/parse.h
@@ -131,6 +131,9 @@ class Parse
// A set of Enclosing_var entries.
typedef std::set<Enclosing_var, Enclosing_var_comparison> Enclosing_vars;
+ // Used to detect duplicate parameter/result names.
+ typedef std::map<std::string, const Typed_identifier*> Names;
+
// Peek at the current token from the lexer.
const Token*
peek_token();
@@ -165,6 +168,7 @@ class Parse
void field_decl(Struct_field_list*);
Type* pointer_type();
Type* channel_type();
+ void check_signature_names(const Typed_identifier_list*, Names*);
Function_type* signature(Typed_identifier*, source_location);
bool parameters(Typed_identifier_list**, bool* is_varargs);
Typed_identifier_list* parameter_list(bool* is_varargs);