[cfe-dev] Visiting implicit copy assignment
Kim Gräsman
kim.grasman at gmail.com
Fri Apr 17 12:58:57 PDT 2015
Hi all,
I'm experimenting with a Clang tool to generate export tables from
source code (MSVC's .DEF files)
I've noticed that MSVC always exports the copy assignment operator if
the class is marked __declspec(dllexport), so I'm trying to mimic that
behavior.
So, given:
class Implicits { };
Can I somehow visit the implicit methods (default ctor, copy ctor,
copy assignment operator, dtor) in a Clang tool?
I've smuggled Sema into the tool and tried to use the DefineImplicit
methods to define them before visitation, but haven't had much luck.
Is there a documented way to handle this? It seems Clang only defines
these methods if they are used, but for tooling it would be useful to
be able to work with them whether they're actually defined or not.
Thanks,
- Kim
More information about the cfe-dev
mailing list