[cfe-dev] Implicitly defined special member functions

Martin Vejnár avakar at technika.junior.cz
Fri Sep 17 04:55:23 PDT 2010


Hi,

I'm trying to use clang as a front end to a static analysis tool (Stanse,
http://stanse.fi.muni.cz/). For that purpose, I'd like to get special
member functions defined even if they are not used. Can I somehow achieve
that? (Note that I'm consuming the AST in HandleTranslationUnit of my
custom ASTConsumer.)

Furthermore, it seems that fn->isThisDeclarationADefinition() returns
false for default constructors and destructors even when the function is
used (and therefore implicitly defined). Is that correct? Shouldn't these
functions receive an empty CompoundStatement as their bodies?

Thanks in advance,
-- 
Martin




More information about the cfe-dev mailing list