aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index feba03d1c7f..abd30e23ce8 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4104,9 +4104,8 @@ expand_or_defer_fn_1 (tree fn)
/* We don't want to process FN again, so pretend we've written
it out, even though we haven't. */
TREE_ASM_WRITTEN (fn) = 1;
- /* If this is an instantiation of a constexpr function, keep
- DECL_SAVED_TREE for explain_invalid_constexpr_fn. */
- if (!is_instantiation_of_constexpr (fn))
+ /* If this is a constexpr function, keep DECL_SAVED_TREE. */
+ if (!DECL_DECLARED_CONSTEXPR_P (fn))
DECL_SAVED_TREE (fn) = NULL_TREE;
return false;
}