[cfe-dev] SA Checker language options

Endre Fulop via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 17 02:04:53 PDT 2018


Hi,

I am maintaining some SA checkers, which are only relevant to specific
languages (C++), and crash when called on irrelevant sources (C).

Are there any best practices, or guidelines regarding the language
assessment of the current translation unit?

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.

I would like to have your suggestions on this matter.

Regards,
Endre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180917/058a36ed/attachment.html>


More information about the cfe-dev mailing list