diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-15 00:13:41 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-15 00:13:41 +0000 |
commit | 76e634ef2c89b4675cd8b79c9c92b5b69b7d44d6 (patch) | |
tree | 288e9d935ea8fff9948d4d5febcb71006ef78382 /TAO/TAO_IDL/util/utl_scope.cpp | |
parent | 563781948d462c67b730456d2f87b479cb2e52ff (diff) | |
download | ATCD-76e634ef2c89b4675cd8b79c9c92b5b69b7d44d6.tar.gz |
Better fix for adding CORBA module members.
Diffstat (limited to 'TAO/TAO_IDL/util/utl_scope.cpp')
-rw-r--r-- | TAO/TAO_IDL/util/utl_scope.cpp | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp index 4a9e49a44a2..b9e37455407 100644 --- a/TAO/TAO_IDL/util/utl_scope.cpp +++ b/TAO/TAO_IDL/util/utl_scope.cpp @@ -1251,7 +1251,7 @@ UTL_Scope::add_to_scope(AST_Decl *e, AST_Decl *ex) idl_global->err ()->redef_error (decl_name->get_string (), ref_string); - break; + return; } // If the spellings differ only by case, it's also an error. else if (decl_name->case_compare_quiet (ref_name) == I_TRUE) @@ -1267,7 +1267,7 @@ UTL_Scope::add_to_scope(AST_Decl *e, AST_Decl *ex) ref_string); } - break; + return; } } @@ -1280,31 +1280,28 @@ UTL_Scope::add_to_scope(AST_Decl *e, AST_Decl *ex) { Identifier *parent_name = d->local_name (); - if (parent_name != 0) - { - if (decl_name->compare (parent_name) == I_TRUE) + if (decl_name->compare (parent_name) == I_TRUE) + { + idl_global->err ()->redef_error ( + decl_name->get_string (), + parent_name->get_string () + ); + } + else if (decl_name->case_compare_quiet (parent_name) == I_TRUE) + { + if (idl_global->case_diff_error ()) { - idl_global->err ()->redef_error ( + idl_global->err ()->name_case_error ( decl_name->get_string (), parent_name->get_string () ); } - else if (decl_name->case_compare_quiet (parent_name) == I_TRUE) + else { - if (idl_global->case_diff_error ()) - { - idl_global->err ()->name_case_error ( - decl_name->get_string (), - parent_name->get_string () - ); - } - else - { - idl_global->err ()->name_case_warning ( - decl_name->get_string (), - parent_name->get_string () - ); - } + idl_global->err ()->name_case_warning ( + decl_name->get_string (), + parent_name->get_string () + ); } } } |