[cfe-dev] Obtaining translation unit file names from plugins

Florian Weimer fweimer at redhat.com
Tue Jul 10 06:30:52 PDT 2012


I've got a PluginASTAction which runs and produces some extra 
diagnostics which are stored in an SQLite database, together with file 
identification information.  If the user changes the file in such a way 
that the plugin does not report any diagnostics, the reporting tool 
cannot tell this scenario from the case where the plugin has not run at 
all on the changed file.  So I would like to gather all file names which 
contribute to the translation unit and mark them as processed in the 
database.  I could transverse the entire AST to collect all file names, 
but surely there is a simpler way to do it?

-- 
Florian Weimer / Red Hat Product Security Team




More information about the cfe-dev mailing list