Declaration shadows field shows error

Answered

In the 2019 version of CLion, a declaration that shadows a field will show as an error. For example, the code:

auto words = static_cast<decltype(this->words)>(__builtin_assume_aligned(this->words, 32));

I understand that some people find this programming practice offensive, however it's all over my codebase. This causes many spurious red bars to appear in CLion and makes it difficult to track down actual errors. Is there a way to disable this "warning"?

0
4 comments

Hi! What error do you see? Please provide a screenshot.

0
Avatar
Permanently deleted user

Hi Anna, thanks for getting back. This is the error:

This should be a warning, with a way to disable it.

0

In order to disable inspection in the editor you need to click the bulb icon 

or press Alt+Enter (for Windows/Linux) to reveal the inspection alert and suggestion list:

Please see https://www.jetbrains.com/help/clion/disabling-and-enabling-inspections.html for more detail.

1
Avatar
Permanently deleted user

Thank you!

0

Please sign in to leave a comment.