summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-07-03 15:11:32 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-07-03 15:11:32 +0000
commit3ccfaf11276178cda9f34db26e1d8c19de097d0a (patch)
treebc3f1d8bc4fb2c2610a6d7f16c462fb976823077
parentdbddc1aa8afd6c82ad2a4745548ac0e3818f929a (diff)
downloadATCD-3ccfaf11276178cda9f34db26e1d8c19de097d0a.tar.gz
ChangeLogTag: Mon Jul 3 15:05:55 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog17
-rw-r--r--TAO/TAO_IDL/be/be_typedef.cpp9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_arg_traits.cpp13
-rw-r--r--TAO/TAO_IDL/be_include/be_typedef.h3
-rw-r--r--TAO/tests/IDL_Test/Bug_2577_Regression.idl6
5 files changed, 42 insertions, 6 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 48549c94501..0ca5ca87aa7 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,20 @@
+Mon Jul 3 15:05:55 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_typedef.cpp:
+ * TAO_IDL/be/be_visitor_arg_traits.cpp:
+ * TAO_IDL/be_include/be_typedef.h:
+
+ Changed logic of how the seen_in_operation_ flag is handled
+ and how the arg traits visitor works for typedefs. There
+ was an interaction between a typedef valuetype member
+ and the use of the base type in an interface operation.
+ This fix closes [BUGID:2577].
+
+ * tests/IDL_Test/Bug_2577_Regression.idl:
+
+ Removed the preprocessor condition around the line that
+ reproduces the bug, and added a comment.
+
Mon Jul 3 14:29:07 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
* tests/OBV/Any/client.cpp:
diff --git a/TAO/TAO_IDL/be/be_typedef.cpp b/TAO/TAO_IDL/be/be_typedef.cpp
index e6bc6629940..f33301349e5 100644
--- a/TAO/TAO_IDL/be/be_typedef.cpp
+++ b/TAO/TAO_IDL/be/be_typedef.cpp
@@ -72,11 +72,18 @@ be_typedef::seen_in_sequence (bool val)
this->primitive_base_type ()->seen_in_sequence (val);
}
+// Some compilers seems to have a problem with a function
+// that's both virtual and overloaded.
+bool
+be_typedef::seen_in_operation (void) const
+{
+ return this->be_type::seen_in_operation ();
+}
+
void
be_typedef::seen_in_operation (bool val)
{
this->be_type::seen_in_operation (val);
- this->primitive_base_type ()->seen_in_operation (val);
}
// Given a typedef node, traverse the chain of base types until they are no
diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
index 1802ac56fec..64ff94073c9 100644
--- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
@@ -1051,11 +1051,24 @@ be_visitor_arg_traits::visit_union_branch (be_union_branch *node)
int
be_visitor_arg_traits::visit_typedef (be_typedef *node)
{
+ if (this->generated (node) || !node->seen_in_operation ())
+ {
+ return 0;
+ }
+
this->ctx_->alias (node);
// Make a decision based on the primitive base type.
be_type *bt = node->primitive_base_type ();
+ // We can't set seen_in_operation_ for the base type
+ // in the be_typedef operation, since valuetype OBV
+ // constructor code may pass in FALSE, and the base
+ // type may be used unaliased in another arg somewhere.
+ // So we just set it to TRUE here, since we know it
+ // has to be TRUE at this point.
+ bt->seen_in_operation (true);
+
if (!bt || (bt->accept (this) == -1))
{
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/TAO_IDL/be_include/be_typedef.h b/TAO/TAO_IDL/be_include/be_typedef.h
index efde9599376..4cd0dd7e029 100644
--- a/TAO/TAO_IDL/be_include/be_typedef.h
+++ b/TAO/TAO_IDL/be_include/be_typedef.h
@@ -41,8 +41,9 @@ public:
// Constructor.
virtual void seen_in_sequence (bool val);
+ virtual bool seen_in_operation (void) const;
virtual void seen_in_operation (bool val);
- // Mutator overrides for be_type members. If we have been
+ // Overrides for be_type members. If we have been
// defined, we want the underlying type to be set as well.
be_type *primitive_base_type (void);
diff --git a/TAO/tests/IDL_Test/Bug_2577_Regression.idl b/TAO/tests/IDL_Test/Bug_2577_Regression.idl
index 93198e5cefb..9b7b9ffa3af 100644
--- a/TAO/tests/IDL_Test/Bug_2577_Regression.idl
+++ b/TAO/tests/IDL_Test/Bug_2577_Regression.idl
@@ -11,11 +11,9 @@ typedef DateTime_T WhenLastUpdated_T;
valuetype Data_T
{
-#if BUG
+ // Typedef valuetype member was blocking generation of
+ // SArg specialization for the struct.
public WhenLastUpdated_T whenLastUpdated;
-#else
- public DateTime_T whenLastUpdated;
-#endif
};
interface User_T {