CLion warning without any way to disable it Follow
I posted this on StackOverflow (with a screenshot) but got no answer, so trying here...
I'm getting the following (probably) inspection warning in CLion:
warning: bitwise operation between different enumeration types is deprecated
There is no context menu option to disable it and I can't find it anywhere in the settings. I can see the warning popup window (see screenshot) when I hover over it with the mouse, but there isn't any information there except the warning text (no error code, intention name or anything at all that gives me a clue as to where this warning comes from)... very strange.
I thought it comes from C++20 compiler warning C5054 from the MSVC compiler so I tried to disable it in CMake with
target_compile_options(engine PRIVATE -wd5054) but it didn't work.
Note: it bothers me since it appears all over my code and I fix the original code that causes it since it comes from in an external library.
Any idea how do I disable this annoyance?
Please sign in to leave a comment.
I found the following Eigen issue - https://gitlab.com/libeigen/eigen/-/issues/2234. Maybe it's related and you need to update Eigen?
Thanks for responding.
I changed my project to use C++17 instead of C++20 and this still happens so I guess it's not related.
Either way, even if it was related, there should be some way for me to disable these warnings, but as I mentioned there is no indication to what causes this "weak warning"... is it an inspection? a compiler warning? Usually there is something that indicates where the message comes from but I can't find anything - there is just the warning and nothing else.
Attaching another screenshot... (this time built with C++17).
This warning comes from clangd (https://reviews.llvm.org/D71576) and is a part of
File | Settings | Editor | Inspections | C/C++ | General | Clangd errors and warnings. In terms of inspection disabling, you can disable only
Clangd errors and warningsall together. But you can configure clangd diagnostic flags in
File | Settings | Languages & Frameworks | C/C++ | Clangd.