diff options
Diffstat (limited to 'odb/semantics')
24 files changed, 69 insertions, 39 deletions
diff --git a/odb/semantics/class-template.cxx b/odb/semantics/class-template.cxx index d764b79..f8bbca4 100644 --- a/odb/semantics/class-template.cxx +++ b/odb/semantics/class-template.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/class-template.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/class-template.hxx> namespace semantics diff --git a/odb/semantics/class.cxx b/odb/semantics/class.cxx index c03de92..97cf088 100644 --- a/odb/semantics/class.cxx +++ b/odb/semantics/class.cxx @@ -3,7 +3,7 @@ #include <odb/gcc.hxx> // TYPE_HAS_DEFAULT_CONSTRUCTOR -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/class.hxx> namespace semantics @@ -25,11 +25,39 @@ namespace semantics { tree t (tree_node ()); - // TYPE_HAS_DEFAULT_CONSTRUCTOR() returns true if we have a - // deleted default ctor. locate_ctor(), on the other hand, - // returns NULL_TREE in this case. + // TYPE_HAS_DEFAULT_CONSTRUCTOR() returns true if we have a deleted + // default ctor. locate_ctor(), on the other hand, returns NULL_TREE in + // this case. // - return TYPE_HAS_DEFAULT_CONSTRUCTOR (t) && locate_ctor (t) != NULL_TREE; + if (TYPE_HAS_DEFAULT_CONSTRUCTOR (t)) + { +#if BUILDING_GCC_MAJOR >= 8 + + // Work around GCC bug 86441. Essentially, we should not trigger an + // instantiation or completion of the default ctor. As a result, we will + // assume that if we have a lazy default ctor, it is not implicitly + // deleted. + // + if (CLASSTYPE_LAZY_DEFAULT_CTOR (t)) + return true; + + for (ovl_iterator i (CLASSTYPE_CONSTRUCTORS (t)); i; ++i) + { + tree f (*i); + + if (TREE_CODE (f) == FUNCTION_DECL && DECL_DELETED_FN (f)) + continue; + + if (default_ctor_p (f)) + return true; + } +#else + return locate_ctor (t) != NULL_TREE; +#endif + + } + + return false; } bool class_:: diff --git a/odb/semantics/derived.cxx b/odb/semantics/derived.cxx index 9cf1504..771ad21 100644 --- a/odb/semantics/derived.cxx +++ b/odb/semantics/derived.cxx @@ -3,7 +3,7 @@ #include <sstream> -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/derived.hxx> using namespace std; diff --git a/odb/semantics/derived.hxx b/odb/semantics/derived.hxx index 60c4896..e58ec9f 100644 --- a/odb/semantics/derived.hxx +++ b/odb/semantics/derived.hxx @@ -416,6 +416,8 @@ namespace semantics string fq_name (names*, string& trailer) const; + using derived_type::fq_name; // Unhide. + public: array (path const&, size_t line, diff --git a/odb/semantics/elements.cxx b/odb/semantics/elements.cxx index f937f54..b5793d0 100644 --- a/odb/semantics/elements.cxx +++ b/odb/semantics/elements.cxx @@ -3,7 +3,7 @@ #include <odb/gcc.hxx> -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/cxx-lexer.hxx> @@ -56,7 +56,7 @@ namespace semantics if (p == &s) return true; - if (p->global_scope ()) + if (!p->named_p () || p->global_scope ()) break; } @@ -75,7 +75,7 @@ namespace semantics if (tree decl = TYPE_NAME (n)) name = DECL_NAME (decl); - return name != 0 && anon_aggrname_p (name); + return name != 0 && IDENTIFIER_ANON_P (name); } return true; @@ -124,7 +124,7 @@ namespace semantics if (tree decl = TYPE_NAME (type)) { name = DECL_NAME (decl); - if (name != 0 && anon_aggrname_p (name)) + if (name != 0 && IDENTIFIER_ANON_P (name)) return true; tree s (CP_DECL_CONTEXT (decl)); @@ -476,7 +476,7 @@ namespace semantics // Look in the outer scope unless requested not to or if this is // the global scope. // - if ((flags & exclude_outer) == 0 && !global_scope ()) + if ((flags & exclude_outer) == 0 && named_p () && !global_scope ()) return scope ().lookup (name, ti, flags, hidden); return 0; diff --git a/odb/semantics/elements.hxx b/odb/semantics/elements.hxx index 12164ba..699a1be 100644 --- a/odb/semantics/elements.hxx +++ b/odb/semantics/elements.hxx @@ -13,11 +13,11 @@ #include <utility> // std::pair #include <cassert> -#include <cutl/fs/path.hxx> -#include <cutl/container/graph.hxx> -#include <cutl/container/pointer-iterator.hxx> -#include <cutl/compiler/type-id.hxx> -#include <cutl/compiler/context.hxx> +#include <libcutl/fs/path.hxx> +#include <libcutl/container/graph.hxx> +#include <libcutl/container/pointer-iterator.hxx> +#include <libcutl/compiler/type-id.hxx> +#include <libcutl/compiler/context.hxx> #include <odb/gcc-fwd.hxx> #include <odb/location.hxx> diff --git a/odb/semantics/enum.cxx b/odb/semantics/enum.cxx index 7fd8204..6432986 100644 --- a/odb/semantics/enum.cxx +++ b/odb/semantics/enum.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/enum.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/enum.hxx> namespace semantics diff --git a/odb/semantics/fundamental.cxx b/odb/semantics/fundamental.cxx index 82446a1..ed4a67f 100644 --- a/odb/semantics/fundamental.cxx +++ b/odb/semantics/fundamental.cxx @@ -3,7 +3,7 @@ #include <odb/gcc.hxx> -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/fundamental.hxx> namespace semantics diff --git a/odb/semantics/namespace.cxx b/odb/semantics/namespace.cxx index 0e1442c..d9be903 100644 --- a/odb/semantics/namespace.cxx +++ b/odb/semantics/namespace.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/namespace.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/namespace.hxx> namespace semantics diff --git a/odb/semantics/relational/changelog.cxx b/odb/semantics/relational/changelog.cxx index 8cee9dd..353497f 100644 --- a/odb/semantics/relational/changelog.cxx +++ b/odb/semantics/relational/changelog.cxx @@ -4,7 +4,7 @@ #include <vector> #include <sstream> -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/changelog.hxx> #include <odb/semantics/relational/model.hxx> diff --git a/odb/semantics/relational/changeset.cxx b/odb/semantics/relational/changeset.cxx index e643285..b044a0c 100644 --- a/odb/semantics/relational/changeset.cxx +++ b/odb/semantics/relational/changeset.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/changeset.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/changeset.hxx> diff --git a/odb/semantics/relational/column.cxx b/odb/semantics/relational/column.cxx index e62a460..9d4d6e5 100644 --- a/odb/semantics/relational/column.cxx +++ b/odb/semantics/relational/column.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/column.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/column.hxx> diff --git a/odb/semantics/relational/elements.cxx b/odb/semantics/relational/elements.cxx index 192c882..de1878a 100644 --- a/odb/semantics/relational/elements.cxx +++ b/odb/semantics/relational/elements.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/elements.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/elements.hxx> #include <odb/semantics/relational/column.hxx> diff --git a/odb/semantics/relational/elements.hxx b/odb/semantics/relational/elements.hxx index 61cd4f3..06ec552 100644 --- a/odb/semantics/relational/elements.hxx +++ b/odb/semantics/relational/elements.hxx @@ -10,16 +10,16 @@ #include <string> #include <cassert> -#include <cutl/container/graph.hxx> -#include <cutl/container/pointer-iterator.hxx> -#include <cutl/compiler/context.hxx> +#include <libcutl/container/graph.hxx> +#include <libcutl/container/pointer-iterator.hxx> +#include <libcutl/compiler/context.hxx> #ifdef ODB_BUILD2 #include <libstudxml/parser.hxx> #include <libstudxml/serializer.hxx> #else -#include <cutl/xml/parser.hxx> -#include <cutl/xml/serializer.hxx> +#include <libcutl/xml/parser.hxx> +#include <libcutl/xml/serializer.hxx> namespace cutl {namespace xml {typedef parser content;}} #endif diff --git a/odb/semantics/relational/foreign-key.cxx b/odb/semantics/relational/foreign-key.cxx index b4c85f9..0357d95 100644 --- a/odb/semantics/relational/foreign-key.cxx +++ b/odb/semantics/relational/foreign-key.cxx @@ -4,7 +4,7 @@ #include <ostream> #include <istream> -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/foreign-key.hxx> diff --git a/odb/semantics/relational/index.cxx b/odb/semantics/relational/index.cxx index 7e6bb94..2329f3a 100644 --- a/odb/semantics/relational/index.cxx +++ b/odb/semantics/relational/index.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/index.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/index.hxx> diff --git a/odb/semantics/relational/key.cxx b/odb/semantics/relational/key.cxx index 318fe96..3511618 100644 --- a/odb/semantics/relational/key.cxx +++ b/odb/semantics/relational/key.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/key.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/key.hxx> #include <odb/semantics/relational/column.hxx> diff --git a/odb/semantics/relational/model.cxx b/odb/semantics/relational/model.cxx index b300274..8763045 100644 --- a/odb/semantics/relational/model.cxx +++ b/odb/semantics/relational/model.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/model.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/model.hxx> diff --git a/odb/semantics/relational/primary-key.cxx b/odb/semantics/relational/primary-key.cxx index 043374f..235340f 100644 --- a/odb/semantics/relational/primary-key.cxx +++ b/odb/semantics/relational/primary-key.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/primary-key.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/primary-key.hxx> diff --git a/odb/semantics/relational/table.cxx b/odb/semantics/relational/table.cxx index b9700b1..3bf763d 100644 --- a/odb/semantics/relational/table.cxx +++ b/odb/semantics/relational/table.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/relational/table.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/relational/table.hxx> diff --git a/odb/semantics/template.cxx b/odb/semantics/template.cxx index d49cf20..f492be0 100644 --- a/odb/semantics/template.cxx +++ b/odb/semantics/template.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/template.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/template.hxx> namespace semantics diff --git a/odb/semantics/union-template.cxx b/odb/semantics/union-template.cxx index f2c3f94..21fc9c0 100644 --- a/odb/semantics/union-template.cxx +++ b/odb/semantics/union-template.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/union-template.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/union-template.hxx> namespace semantics diff --git a/odb/semantics/union.cxx b/odb/semantics/union.cxx index 980dfa4..007ef57 100644 --- a/odb/semantics/union.cxx +++ b/odb/semantics/union.cxx @@ -1,7 +1,7 @@ // file : odb/semantics/union.cxx // license : GNU GPL v3; see accompanying LICENSE file -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/union.hxx> namespace semantics diff --git a/odb/semantics/unit.cxx b/odb/semantics/unit.cxx index fe191bc..4f92aed 100644 --- a/odb/semantics/unit.cxx +++ b/odb/semantics/unit.cxx @@ -3,7 +3,7 @@ #include <odb/gcc.hxx> -#include <cutl/compiler/type-info.hxx> +#include <libcutl/compiler/type-info.hxx> #include <odb/semantics/unit.hxx> namespace semantics |