]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/pt.c
[c++]: Unconfuse lookup_name_real API a bit
[thirdparty/gcc.git] / gcc / cp / pt.c
index cb81d8e9229bb41518d9b8b077c08d85bb6dafd7..5fd16bf781cd8ecebb4063f13c6bfd5960c2b4c0 100644 (file)
@@ -11183,9 +11183,9 @@ tsubst_friend_class (tree friend_tmpl, tree args)
       push_nested_class (context);
     }
 
-  tmpl = lookup_name_real (DECL_NAME (friend_tmpl), /*prefer_type=*/false,
-                          /*non_class=*/false, /*block_p=*/false,
-                          /*namespaces_only=*/false, LOOKUP_HIDDEN);
+  tmpl = lookup_name_real (DECL_NAME (friend_tmpl), LOOK_where::CLASS_NAMESPACE,
+                          /*prefer_type=*/0, /*namespaces_only=*/false,
+                          LOOKUP_HIDDEN);
 
   if (tmpl && DECL_CLASS_TEMPLATE_P (tmpl))
     {
@@ -17835,7 +17835,7 @@ lookup_init_capture_pack (tree decl)
   for (int i = 0; i < len; ++i)
     {
       tree ename = vec ? make_ith_pack_parameter_name (cname, i) : cname;
-      tree elt = lookup_name_real (ename, 0, 0, true, 0, LOOKUP_NORMAL);
+      tree elt = lookup_name_real (ename, LOOK_where::ALL, 0, 0, LOOKUP_NORMAL);
       if (vec)
        TREE_VEC_ELT (vec, i) = elt;
       else
@@ -17940,9 +17940,10 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
            tree inst;
            if (!DECL_PACK_P (decl))
              {
-               inst = lookup_name_real (DECL_NAME (decl), /*prefer_type*/0,
-                                        /*nonclass*/1, /*block_p=*/true,
-                                        /*ns_only*/0, LOOKUP_HIDDEN);
+               inst = lookup_name_real (DECL_NAME (decl),
+                                        LOOK_where::BLOCK_NAMESPACE,
+                                        /*prefer_type*/0, /*ns_only*/0,
+                                        LOOKUP_HIDDEN);
                gcc_assert (inst != decl && is_capture_proxy (inst));
              }
            else if (is_normal_capture_proxy (decl))