aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/decl.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 45206c2..16565bf 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -8077,7 +8077,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
&& (DECL_INITIAL (decl) || init))
DECL_INITIALIZED_IN_CLASS_P (decl) = 1;
- if (TREE_CODE (decl) != FUNCTION_DECL
+ if (VAR_P (decl)
&& (auto_node = type_uses_auto (type)))
{
tree d_init;
@@ -8105,11 +8105,10 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
d_init = resolve_nondeduced_context (d_init, tf_warning_or_error);
}
enum auto_deduction_context adc = adc_variable_type;
- if (VAR_P (decl) && DECL_DECOMPOSITION_P (decl))
+ if (DECL_DECOMPOSITION_P (decl))
adc = adc_decomp_type;
tree outer_targs = NULL_TREE;
if (PLACEHOLDER_TYPE_CONSTRAINTS_INFO (auto_node)
- && VAR_P (decl)
&& DECL_LANG_SPECIFIC (decl)
&& DECL_TEMPLATE_INFO (decl)
&& !DECL_FUNCTION_SCOPE_P (decl))