<div dir="ltr">Hi,<div><br><div>I am maintaining some SA checkers, which are only relevant to specific languages (C++), and crash when called on irrelevant sources (C).</div><div><br><div>Are there any best practices, or guidelines regarding the language assessment of the current translation unit?</div></div><div><br></div><div>I am aware that GTestChecker uses its register method to check LangOpts to only register in case the current TU is C++. I have also encountered sporadic LangOpts checks inside the checker callback methods. We could also query the build system to map TU-s to language categories, however, inside the clang framework, a more cognizant decision could be made.</div><div><br></div><div>I would like to have your suggestions on this matter.</div><div><br></div><div>Regards,</div><div>Endre</div></div></div>