<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><div class="gmail_default" style="font-family:arial,sans-serif">Hi,</div><div class="gmail_default" style="font-family:arial,sans-serif">As part of compliance for our <a href="https://github.com/microsoft/checkedc-clang" target="_blank">Checked C</a> LLVM compiler, we at Microsoft ran the <a href="https://www.codeproject.com/Articles/167588/Using-PREfast-for-Static-Code-Analysis" target="_blank">PREfast</a> static analysis tool on the entire llvm/clang codebase. The tool reported hundreds of warnings due to variables being shadowed.For example:</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif"><font face="monospace">clang/lib/Sema/TreeTransform.h(3709) Local declaration of 'I' hides declaration of the same name in outer scope. See previous declaration at line '3653'.</font><br></div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif"><font face="monospace"><br></font></div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif">We can upstream fixes to these (and other) warnings if the community would like them fixed. The full list of warnings can be found <a href="https://docs.google.com/spreadsheets/d/1h_3tHxsgBampxb7PXoB5lgwiBSpTty9RLe5maIQxnTk/edit?usp=sharing">here</a>.</div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif">Also, is there a reason we do not turn on the -Wshadow flag by default for llvm builds?</div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif">Mandeep</div></div></div>