Skip to content

build: Enable -Wshadow

This is an attempt to demonstrate what is necessary to get -Wshadow building under -Werror on clang, and to see what other existing pull requests that might conflict with.

This was prompted by an example of shadowing I spotted in review. We currently warn against shadowing in the docs but do not detect it, so instead rely on review to identify these issues.

Note:

The question is: have the circumstances changed in the past 9 years? Is a partial fix beneficial?

One option would be to merge the low-risk changes, re. tests, etc. and exclude sensitive files from this warning to get it applied to regular builds.

Related:

Merge request reports

Loading