* pt.c (tsubst_expr): Remove shadowing declaration.
(tsubst_pack_expansion): Add assert.
* semantics.c (add_decl_expr): Use DECL_SOURCE_LOCATION.
From-SVN: r235213
2016-04-19 Jason Merrill <jason@redhat.com>
+ * pt.c (tsubst_expr): Remove shadowing declaration.
+ (tsubst_pack_expansion): Add assert.
+
+ * semantics.c (add_decl_expr): Use DECL_SOURCE_LOCATION.
+
PR c++/70522
* name-lookup.c (qualified_lookup_using_namespace): Look through
hidden names.
/* We can't substitute for this parameter pack. We use a flag as
well as the missing_level counter because function parameter
packs don't have a level. */
+ gcc_assert (processing_template_decl);
unsubstituted_packs = true;
}
}
{
tree scope = USING_DECL_SCOPE (decl);
tree name = DECL_NAME (decl);
- tree decl;
scope = tsubst (scope, args, complain, in_decl);
decl = lookup_qualified_name (scope, name,
void
add_decl_expr (tree decl)
{
- tree r = build_stmt (input_location, DECL_EXPR, decl);
+ tree r = build_stmt (DECL_SOURCE_LOCATION (decl), DECL_EXPR, decl);
if (DECL_INITIAL (decl)
|| (DECL_SIZE (decl) && TREE_SIDE_EFFECTS (DECL_SIZE (decl))))
r = maybe_cleanup_point_expr_void (r);