[poppler] [PATCH] Clang++ plugin that checks GooString::format-like calls

Albert Astals Cid aacid at kde.org
Mon Feb 17 15:01:56 PST 2014


El Dilluns, 17 de febrer de 2014, a les 22:31:42, Albert Astals Cid va 
escriure:
> El Dilluns, 17 de febrer de 2014, a les 00:26:44, Fabio D'Urso va escriure:
> > Hi,
> > 
> > The clang plugin that checks for GooString::format usage errors is
> > (finally!) ready. o/
> 
> Awesome, which clang did you use to write this?

Ah, just an include was missing as you found out and told me on IRC, added it 
and commited.

Cheers,
  Albert

> 
> I'm on 3.4 and get
> 
> goostring-format-checker.cc:24:46: error: unknown template name
> 'RecursiveASTVisitor'
> class GooStringFormatCheckerVisitor : public
> RecursiveASTVisitor<GooStringFormatCheckerVisitor> {
>                                              ^
> goostring-format-checker.cc:340:11: error: no member named 'TraverseDecl' in
> '<anonymous>::GooStringFormatCheckerVisitor'
>                 visitor.TraverseDecl(ctx.getTranslationUnitDecl());
>                 ~~~~~~~ ^
> 2 errors generated.
> 
> Cheers,
>   Albert
> 
> > It goes through each call to GooString::format, GooString::appendf or
> > error, and it checks that the extra arguments match the format string.
> > 
> > In order to run it, you need to compile the plugin, set CXXFLAGS
> > accordingly and compile poppler with clang++. It's explained in detail in
> > the README file.
> > 
> > The 0002 patch fixes some minor issues spotted by the tool.
> > 
> > Fabio
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler



More information about the poppler mailing list