[cfe-dev] Fwd: Clang: checker vs. plugin
Aitor San Juan
aitor.sj at opendeusto.es
Fri May 2 06:19:41 PDT 2014
Jordan, don't worry for the belated answer. There must be other issues more
important and urgent, but I very much appreciate the clarifying comments.
Just skimming over the API, I once came across with ASTWriter, which made
me (wrongly) think its use was for programatically changing the AST. It
makes sense to prohibit such modifications. One could end up generating
invalid code. Having read through more carefully, I've realized that its
purpose is deserialization (there exists the counterpart ASTReader).
May I ask one last question on this? Let's say you want to make sure
developers follow specific coding rules, you can do that by applying a
checker or a plugin and integrate it into the build or compile process. I
guess for this particular task a plugin would best fit. Am I correct?
However, to what extent can a checker or a plugin influence in the build
and/or compile process? As far as I know, a checker cannot interfere in the
compile process. In the checker dev. manual ("bug reports" section) it says
that a checker (depending on the detected issue) may stop the analysis.
When talking about "stopping the analysis", I understand that it always
refers to stopping the analysis along the current execution path, not to
the fact that by emitting a report from one checker you might tell the
analyzer to stop and terminate. Am I right? I guess the case of a plugin is
similar: I mean you cannot tell the compiler to stop compiling by emitting
warnings from within a plugin.
Many thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140502/997d8746/attachment.html>
More information about the cfe-dev
mailing list