tree.c (cp_walk_subtrees): Do not set input_location.
authorRichard Guenther <rguenther@suse.de>
Thu, 29 Mar 2007 12:55:14 +0000 (12:55 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 29 Mar 2007 12:55:14 +0000 (12:55 +0000)
2007-03-29  Richard Guenther  <rguenther@suse.de>

* tree.c (cp_walk_subtrees): Do not set input_location.

From-SVN: r123329

gcc/cp/ChangeLog
gcc/cp/tree.c

index 4f2b06191efa5d4c1d17abf5e0036e0fcb762995..bf5e28c272ef805a92e8adc2a3d106f08a588930 100644 (file)
@@ -1,3 +1,7 @@
+2007-03-29  Richard Guenther  <rguenther@suse.de>
+
+       * tree.c (cp_walk_subtrees): Do not set input_location.
+
 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
 
        PR c++/29077
index d334a689e29b9ef2cac8e8854b8c87dbb80a7679..7fd6664a8c61a4ce5e0d9f371d5e9aab3d96bfc1 100644 (file)
@@ -2203,7 +2203,6 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
                  void *data, struct pointer_set_t *pset)
 {
   enum tree_code code = TREE_CODE (*tp);
-  location_t save_locus;
   tree result;
 
 #define WALK_SUBTREE(NODE)                             \
@@ -2214,12 +2213,6 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
     }                                                  \
   while (0)
 
-  /* Set input_location here so we get the right instantiation context
-     if we call instantiate_decl from inlinable_function_p.  */
-  save_locus = input_location;
-  if (EXPR_HAS_LOCATION (*tp))
-    input_location = EXPR_LOCATION (*tp);
-
   /* Not one of the easy cases.  We must explicitly go through the
      children.  */
   result = NULL_TREE;
@@ -2301,13 +2294,11 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
       break;
 
     default:
-      input_location = save_locus;
       return NULL_TREE;
     }
 
   /* We didn't find what we were looking for.  */
  out:
-  input_location = save_locus;
   return result;
 
 #undef WALK_SUBTREE