While it isn't a warning (and it isn't a super uncommon practice for people to use local variables to shadow class fields), this should get picked up by code Code Analyzer CA1500.
This article explains how to enable code analyzers.