[cfe-dev] What code generates default constructors?

Gregory Malecha via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 22 03:48:26 PST 2019

Hello --

I'm trying to understand how ASTs for constructors are generated when they
are referenced. In particular, I'm working on a libtooling tool that will
dump the AST to another format on a per-file basis so I need to know the
code for any constructors even if they are not called in the file.

Very concretely, if I write the following code:

class P {};
int main() {
   P x;
   return 0;

the result of -ast-dump will contain the implementation of the default
constructor (not very interesting in this case). What code generates this?

Thank you.

gregory malecha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190122/e22542da/attachment.html>

More information about the cfe-dev mailing list