Unable to disable the inspection for "declaration shadows a field".


I'd like to be able to disable the inspection for "declaration shadows a field".  My coding style has me always accessing members of a class instance through that instance, so the shadowing is a non-issue for me.  When I right-click the warning in the Problems view, I see nothing about disabling that inspection.

Here's an example of the code that's causing the warning to appear:

void LEDControl::SetValue(const int value)
    this->value = value;

The function header is the line that's causing the warning to appear.  With the way I've written my code, the shadowing is not an issue I need to worry about.

评论操作 固定链接


This warning 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 warnings all together. But you can configure clangd diagnostic flags in File | Settings | Languages & Frameworks | C/C++ | Clangd.