From 823ec53170fa7092bb0b88db13a3c5e64bf14159 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Jan 2015 11:09:19 +0200 Subject: Fix bug in alias-declaration handling Apparently for alias-declaration (but not ordinary typedef) we need to check for template info on the main variant. --- odb/parser.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'odb') diff --git a/odb/parser.cxx b/odb/parser.cxx index 9838a05..4acf6c7 100644 --- a/odb/parser.cxx +++ b/odb/parser.cxx @@ -1642,6 +1642,7 @@ create_type (tree t, case RECORD_TYPE: case UNION_TYPE: { + t = TYPE_MAIN_VARIANT (t); tree ti (TYPE_TEMPLATE_INFO (t)); if (ti == NULL_TREE) @@ -1657,7 +1658,6 @@ create_type (tree t, // create a "stub" class node which will be processed and // filled in later. // - t = TYPE_MAIN_VARIANT (t); // Pointers to member functions are represented as record // types. Detect and handle this case. @@ -1707,7 +1707,6 @@ create_type (tree t, { // Template instantiation. // - t = TYPE_MAIN_VARIANT (t); tree decl (TI_TEMPLATE (ti)); // DECL_TEMPLATE // Get to the most general template declaration. -- cgit v1.1