This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)
On 06/08/2017 01:25 PM, Martin Sebor wrote:
+ if (TREE_CHAIN (DECL_ARGUMENTS (f)))
+ /* Skip constructors that aren't copy or move ctors. */
+ if (!copy_fn_p (f))
+ cpy_or_move_ctor_p = true;
+ /* Constructor is a default ctor. */
+ cpy_or_move_ctor_p = false;
A default constructor can have parameters, so long as they have default
arguments. You can use default_ctor_p to test for a default constructor.