init.c (expand_default_init): Fix } indentation.
authorNathan Sidwell <nathan@acm.org>
Mon, 26 Sep 2016 10:29:53 +0000 (10:29 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 26 Sep 2016 10:29:53 +0000 (10:29 +0000)
* init.c (expand_default_init): Fix } indentation.
* method.c (process_subob_fn): Simplify control structure to
remove gotos.
(implicitly_declare_fn): Remove duplicated lambda ctor check.

From-SVN: r240489

gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/method.c

index 8f12833f34fd8c94c4f4987ecc07b010fee78a99..f250a82f4fbb2b4d275cff86898d77816c2c0c96 100644 (file)
@@ -1,3 +1,10 @@
+2016-09-26  Nathan Sidwell  <nathan@acm.org>
+
+       * init.c (expand_default_init): Fix } indentation.
+       * method.c (process_subob_fn): Simplify control structure to
+       remove gotos.
+       (implicitly_declare_fn): Remove duplicated lambda ctor check.
+
 2016-09-26  Marek Polacek  <polacek@redhat.com>
 
        PR c/7652
index c64ec3f29127ff73be8db65c975407df9f4cd5d0..798de0871608d38042d4a224a5cf080f88f56835 100644 (file)
@@ -1747,7 +1747,7 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags,
        ctor_name = base_ctor_identifier;
       rval = build_special_member_call (exp, ctor_name, &parms, binfo, flags,
                                        complain);
-  }
+    }
 
   if (parms != NULL)
     release_tree_vector (parms);
index 957ea391383c50e4ea680a4ef204debb89b664b5..5de20d406551e1c8a1625c9c4b9c52a5dc7da60f 100644 (file)
@@ -1129,7 +1129,11 @@ process_subob_fn (tree fn, tree *spec_p, bool *trivial_p,
                  bool diag, tree arg, bool dtor_from_ctor = false)
 {
   if (!fn || fn == error_mark_node)
-    goto bad;
+    {
+      if (deleted_p)
+       *deleted_p = true;
+      return;
+    }
 
   if (spec_p)
     {
@@ -1162,12 +1166,6 @@ process_subob_fn (tree fn, tree *spec_p, bool *trivial_p,
          explain_invalid_constexpr_fn (fn);
        }
     }
-
-  return;
-
- bad:
-  if (deleted_p)
-    *deleted_p = true;
 }
 
 /* Subroutine of synthesized_method_walk to allow recursion into anonymous
@@ -1931,12 +1929,6 @@ implicitly_declare_fn (special_function_kind kind, tree type,
   DECL_DEFAULTED_FN (fn) = 1;
   if (cxx_dialect >= cxx11)
     {
-      /* "The closure type associated with a lambda-expression has a deleted
-        default constructor and a deleted copy assignment operator."  */
-      if ((kind == sfk_constructor
-          || kind == sfk_copy_assignment)
-         && LAMBDA_TYPE_P (type))
-       deleted_p = true;
       DECL_DELETED_FN (fn) = deleted_p;
       DECL_DECLARED_CONSTEXPR_P (fn) = constexpr_p;
     }