[cfe-dev] warnings are suppressed during 2nd compilation with WrapperFrontendAction()

Ivan Koster via cfe-dev cfe-dev at lists.llvm.org
Tue Feb 23 08:07:51 PST 2016


Hi all,

I have finally made the easy-test-seam tool that I mentioned here:
http://lists.llvm.org/pipermail/cfe-dev/2014-December/040578.html

I'm really a cpp \ llvm newbie so it was a considerable effort. I've
borrowed ideas from the FixItRecompile functionality and used
the WrapperFrontendAction class.
The easy-test-seam functionality works, the generated code is correct.
The commit can be found on github here:
https://github.com/ivankoster/clang/commit/14b48590af28129ba3ffcf647274dd483d0a22dc

The only sad part is:
I'm generating the AST twice, due to the wrapper action, but the
diagnostics are not printed for the 2nd AST generation. This is very
unfortunate, because the first generation of the AST is almost always
guaranteed to contain warnings, because of the way I designed
easy-test-seam. (We're essentially assigning a value to an identifier that
is unassignable, but it becomes assignable in the 2nd generation...) And I
want to suppress the first set of diagnostics, but let all the diagnostics
from the 2nd generation through!

Could anyone take a look at my commit and see what I did wrong?
I've been looking at my code for a few hours now, but my lack of experience
with the clang codebase is working against me.

Many thanks in advance!

Ivan Koster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160223/966493e7/attachment.html>


More information about the cfe-dev mailing list