Fix location of dependent member CALL_EXPR.
authorJason Merrill <jason@redhat.com>
Wed, 25 Sep 2019 03:27:26 +0000 (23:27 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 25 Sep 2019 03:27:26 +0000 (23:27 -0400)
The break here was skipping over the code that sets EXPR_LOCATION on the
call expressions, for no good reason.

* parser.c (cp_parser_postfix_expression): Do set location of
dependent member call.

From-SVN: r276112

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

index f4c87c56b1c74c2b36ce162e285a55a9ae638a93..e5edd806947c613ae931930f58284a913a44ff74 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-24  Jason Merrill  <jason@redhat.com>
+
+       * parser.c (cp_parser_postfix_expression): Do set location of
+       dependent member call.
+
 2019-09-24  Marek Polacek  <polacek@redhat.com>
 
        PR c++/91868 - improve -Wshadow location.
index da0ffacc21860a18fe482743d83481b2e7efd066..44082f7a05fb45eb9c72e6022eeaa4d7b1015bd6 100644 (file)
@@ -7375,11 +7375,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
                    maybe_generic_this_capture (instance, fn);
                    postfix_expression
                      = build_min_nt_call_vec (postfix_expression, args);
-                   release_tree_vector (args);
-                   break;
                  }
-
-               if (BASELINK_P (fn))
+               else if (BASELINK_P (fn))
                  {
                  postfix_expression
                    = (build_new_method_call