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

已完成

Hi,

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?

Bye,
Mark

 

评论操作 固定链接

Hi,

take a look at this: https://youtrack.jetbrains.com/issue/CPP-29091/In-template-call-to-builtinoperatordelete-selects-non-usual-deallocation-function-gcc-12#focus=Comments-27-6067190.0-0

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."

1
评论操作 固定链接

It worked thanks!

 

0

请先登录再写评论。