summaryrefslogtreecommitdiff
path: root/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp')
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
index a1d32705644..28c673a94f3 100644
--- a/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
+++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticGraph/Union.cpp
@@ -142,18 +142,28 @@ namespace CCF
{
if (defined ())
{
+ CompilerElements::Context& ctx (
+ const_cast<CompilerElements::Context&> (context ()));
+
+ if (ctx.count ("union-complete-test"))
+ return true;
+
+ ctx.set ("union-complete-test", true);
+ bool c (true);
+
for (Scope::NamesIterator i (names_begin ());
- i != names_end ();
+ c && i != names_end ();
++i)
{
Member const& m (dynamic_cast<Member&> ((*i)->named ()));
Type const& t (m.belongs ().type ());
if (!t.complete ())
- return false;
+ c = false;
}
- return true;
+ ctx.remove ("union-complete-test");
+ return c;
}
return false;