From 33cd64535d2307a2e7884ee0796e1aae42937aaf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 19 Aug 2010 14:36:47 +0200 Subject: Add validator pass Detect members with anonymous types. --- odb/plugin.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'odb/plugin.cxx') diff --git a/odb/plugin.cxx b/odb/plugin.cxx index 6cceea3..dd097cc 100644 --- a/odb/plugin.cxx +++ b/odb/plugin.cxx @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -39,8 +40,19 @@ gate_callback (void*, void*) path file (main_input_filename); auto_ptr u (p.parse (global_namespace, file)); - generator g; - g.generate (*options_, *u, file); + // + // + validator v; + if (!v.validate (*options_, *u, file)) + r = 1; + + // + // + if (r == 0) + { + generator g; + g.generate (*options_, *u, file); + } } catch (parser::failed const&) { -- cgit v1.1