* parser.c (cp_parser_sizeof_operand): Remove redundant grokdeclarator.
authorJason Merrill <jason@redhat.com>
Thu, 25 Oct 2018 19:23:33 +0000 (15:23 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 25 Oct 2018 19:23:33 +0000 (15:23 -0400)
From-SVN: r265503

gcc/cp/ChangeLog
gcc/cp/parser.c

index c90d91b7b8240d2aff112519ceda927ab565a8da..27b739c7a15d22be416b931f4739932f529be55a 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-25  Jason Merrill  <jason@redhat.com>
+
+       * parser.c (cp_parser_sizeof_operand): Remove redundant use of
+       grokdeclarator.
+
 2018-10-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/86288
index 2533871fb28afaa1d9b01e87ba15ced832d6274a..ebe326eb923d0f3613d1d87872daab08d44d52f8 100644 (file)
@@ -28167,20 +28167,7 @@ cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword)
 
       /* If all went well, then we're done.  */
       if (cp_parser_parse_definitely (parser))
-       {
-         cp_decl_specifier_seq decl_specs;
-
-         /* Build a trivial decl-specifier-seq.  */
-         clear_decl_specs (&decl_specs);
-         decl_specs.type = type;
-
-         /* Call grokdeclarator to figure out what type this is.  */
-         expr = grokdeclarator (NULL,
-                                &decl_specs,
-                                TYPENAME,
-                                /*initialized=*/0,
-                                /*attrlist=*/NULL);
-       }
+       expr = type;
     }
 
   /* If the type-id production did not work out, then we must be