Clang Comment Checker

I have a few simple self contained checkers that implement some very basic
checks for certain function calls for file access, gps usage, crypto usage,
etc. (e.g. 'writeToFile' in Objective C). When any of these are used in the
code (such as 'writeToFile') it is included in the generated analysis
report. I want to be able to not include certain findings in the report
based on comments on the same line within the code. So if 'writeToFile' is
found, the checker should only generate a warning and include in the
analysis report if the line which it is on does not contain a specific
comment ("//checked"). I am trying to check the findings as I go and want to
mark them as checked so the checker does not find them every time I run the

Can something like this be done within the checker?


Not right now. There is a general feature request to expose comments as a first-class elements (such as in the AST) that can be exposed to higher-level tools (e.g., the static analyzer, or a documentation generator). Currently they are just discarded. Once this infrastructure is in place, this should be possible to do in the static analyzer.