aboutsummaryrefslogtreecommitdiff
path: root/odb/semantics
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-10 09:10:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-21 15:39:59 +0200
commitdcb7bcd541f77b280e5733da9ec1eb24574e0d9e (patch)
treee39b99a1dfa9db4fbbac02462923523e3de331a9 /odb/semantics
parent7ae497743c7b042904fe1f6b4153ab3f4763ff2b (diff)
Add default_ctor() to semantics::class_
Use it in the code generators instead of calling the GCC AST macro.
Diffstat (limited to 'odb/semantics')
-rw-r--r--odb/semantics/class.cxx8
-rw-r--r--odb/semantics/class.hxx4
2 files changed, 12 insertions, 0 deletions
diff --git a/odb/semantics/class.cxx b/odb/semantics/class.cxx
index 49dbade..6d1621a 100644
--- a/odb/semantics/class.cxx
+++ b/odb/semantics/class.cxx
@@ -3,6 +3,8 @@
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v3; see accompanying LICENSE file
+#include <odb/gcc.hxx> // TYPE_HAS_DEFAULT_CONSTRUCTOR
+
#include <cutl/compiler/type-info.hxx>
#include <odb/semantics/class.hxx>
@@ -20,6 +22,12 @@ namespace semantics
{
}
+ bool class_::
+ default_ctor () const
+ {
+ return TYPE_HAS_DEFAULT_CONSTRUCTOR (tree_node ());
+ }
+
// type info
//
namespace
diff --git a/odb/semantics/class.hxx b/odb/semantics/class.hxx
index 924cfdd..2d86cff 100644
--- a/odb/semantics/class.hxx
+++ b/odb/semantics/class.hxx
@@ -88,6 +88,10 @@ namespace semantics
}
public:
+ bool
+ default_ctor () const;
+
+ public:
class_ (path const&, size_t line, size_t column, tree);
void