<div dir="ltr">Hi,<br><br>As my first contribution to LLVM I would like to implement a clang-tidy check that enforces the usage of scoped enumerations based on the <a href="https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-class" target="_blank">C++ Core Guidelines</a>. I already submitted a <a href="https://reviews.llvm.org/D85697#2209272" target="_blank">review</a> and now I am working on the changes based on the feedback.<div><br></div><div>I think I addressed most of the feedback, but I have some difficulties to figure out when an unscoped enum cannot be changed to scoped enumerations. A good example for this is already mentioned in the review: when any of the decls or the usages (except the ones that are properly qualified by the enum name) are in a macro.<br><br>I think another example for the unfixable case might be if any of the decls or the usages are in a source from where the diagnostics are emitted, i.e.: filtered out with header-filter or line-filter arguments. Can I somehow extract that information within a derived class of ClangTidyCheck? I think the ClangTidiyCheck::Context member variable holds that information, but it doesn't expose that member nor the necessary information to the derived classes.<br><br>To sum up, my questions are:<br><ol><li style="margin-left:15px">Can I somehow check from a derived ClangTidyCheck if the current location is going to be filtered out?<br></li><li style="margin-left:15px">If the answer for the previous question is no, then how should I handle this situation?</li><li style="margin-left:15px">Do you know any other case where the decls/usages shouldn't be fixed? </li></ol><div><span style="color:rgb(102,102,102)"><br></span></div><div><span style="color:rgb(102,102,102)">Thanks for the help,</span><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font color="#666666">Benjamin</font></div></div></div></div></div></div></div></div></div></div>