Hi there,

Apologies if this is the wrong place to ask about this - if it is I'd be
very grateful if you'd point me in the right direction :)

I'm seeing the clang-tidy warning 'misc-new-delete-overloads' when using
the two parameter version of class member delete, however when using the
single parameter version the warning goes away.

class Type
{
    void* operator new(size_t) { ... }
    void operator delete(void*) { ... } // no warning
    void operator delete (void*, size_t) { ... } // warning
};

When using the second version I don't think this warning should be
reported. Is this correct or am I missing something?

I've been double checking things here:

https://en.cppreference.com/w/cpp/memory/new/operator_new (Items 15, 16)
https://en.cppreference.com/w/cpp/memory/new/operator_delete (Items 17, 18
and 21, 22)

I'm using clang on Windows and using Clang Power Tools in Visual Studio to
invoke clang-tidy.

Any info would be greatly appreciated!

Thank you for your time,


Tom
_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to