diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/cp-objcp-common.c | 10 | ||||
-rw-r--r-- | gcc/cp/cp-objcp-common.h | 3 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c0b6fb5d1f9..5cb8203a636 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2014-10-02 Mark Wielaard <mjw@redhat.com> + + PR debug/63239 + * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define. + (cp_function_decl_deleted_p): New prototype. + * cp-objcp-common.c (cp_function_deleted_p): New function. + 2014-10-03 Marc Glisse <marc.glisse@inria.fr> PR c++/54427 diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index 0c50f4085ab..0d144ef0ba7 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -168,6 +168,16 @@ cp_function_decl_explicit_p (tree decl) && DECL_NONCONVERTING_P (decl)); } +/* Return true if DECL is deleted special member function. */ + +bool +cp_function_decl_deleted_p (tree decl) +{ + return (decl + && DECL_LANG_SPECIFIC (STRIP_TEMPLATE (decl)) + && DECL_DELETED_FN (decl)); +} + /* Stubs to keep c-opts.c happy. */ void push_file_scope (void) diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index 246800eef90..c289774b0c6 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -27,6 +27,7 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, tree, bool); extern bool cp_function_decl_explicit_p (tree decl); +extern bool cp_function_decl_deleted_p (tree decl); extern void cp_common_init_ts (void); /* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks @@ -131,6 +132,8 @@ extern void cp_common_init_ts (void); #define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr #undef LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P #define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P cp_function_decl_explicit_p +#undef LANG_HOOKS_FUNCTION_DECL_DELETED_P +#define LANG_HOOKS_FUNCTION_DECL_DELETED_P cp_function_decl_deleted_p #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING #define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR |