in template: call to '__builtin_operator_delete' selects non-usual deallocation function



I keep getting this code-analysis warning pop-up in various random places:

"In template: call to '__builtin_operator_delete' selects non-usual deallocation function"

I'm not sure what's causing it, but it seems to happen more often in code that calls functions that return a std::vector, although I've seen it pop-up elsewhere too, eg: in my custom SharedPtr<> class.

I'm not using operator delete or in-place new or anything like that and so far I don't have a clue what's causing it.

 I've just been ignoring it and nothing bad seems to have happened, but it's starting to get annoying so I'd quite like to turn it off, however I can't seem to find the correct clang-tidy setting to disable - any ideas?



评论操作 固定链接


take a look at this:

It gives following advice which worked for me:
"Adding -fsized-deallocation to clangd flags in Settings | Languages & Frameworks | C/C++ | Clangd should resolve the issue until the proper fix arrives."

评论操作 固定链接

It worked thanks!