aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-19 14:36:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-19 14:36:47 +0200
commit33cd64535d2307a2e7884ee0796e1aae42937aaf (patch)
tree6f20845b78387138def085377b3a07f984f09507 /odb/mysql
parent7615f4dd87092aec82569bce68d75efcb82a90ae (diff)
Add validator pass
Detect members with anonymous types.
Diffstat (limited to 'odb/mysql')
-rw-r--r--odb/mysql/header.cxx34
1 files changed, 0 insertions, 34 deletions
diff --git a/odb/mysql/header.cxx b/odb/mysql/header.cxx
index 5e64c12..237cb85 100644
--- a/odb/mysql/header.cxx
+++ b/odb/mysql/header.cxx
@@ -219,46 +219,12 @@ namespace mysql
// Find the id member and type.
//
id_member_.traverse (c);
-
- if (id_member_.member () == 0)
- {
- cerr << c.file () << ":" << c.line () << ":" << c.column () << ":"
- << " error: no data member designated as object id" << endl;
-
- cerr << c.file () << ":" << c.line () << ":" << c.column () << ":"
- << " info: use '#pragma odb id' to specify object id member"
- << endl;
- }
-
semantics::data_member& id (*id_member_.member ());
semantics::type& id_type (id.type ());
- if (id_type.anonymous ())
- {
- // Can be a template-id (which we should handle eventually) or an
- // anonymous type in member declaration (e.g., struct {...} m_;).
- //
- cerr << id.file () << ":" << id.line () << ":" << id.column () << ":"
- << " error: unnamed type in data member declaration" << endl;
-
- cerr << id.file () << ":" << id.line () << ":" << id.column () << ":"
- << " info: use 'typedef' to name this type"
- << endl;
-
- throw generation_failed ();
- }
-
member_count_.traverse (c);
size_t column_count (member_count_.count ());
- if (column_count == 0)
- {
- cerr << c.file () << ":" << c.line () << ":" << c.column () << ":"
- << " error: no persistent data members in the class" << endl;
-
- throw generation_failed ();
- }
-
os << "// " << c.name () << endl
<< "//" << endl;