On Fri, Jan 8, 2016 at 10:55 AM, David Blaikie <dblai...@gmail.com> wrote:
> > > On Fri, Jan 8, 2016 at 10:08 AM, Artem Belevich via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> tra added inline comments. >> >> ================ >> Comment at: include/clang/Driver/Action.h:36 >> @@ -35,1 +35,3 @@ >> +/// >> +/// Actions are usually owned by a Compilation. >> class Action { >> ---------------- >> There's no API to pass ownership to Compilation explicitly, so the only >> way for an Action to be owned by Compilation is to create it with >> MakeAction. >> >> Perhaps "Actions created with MakeAction<>() are owned by Compilation" >> >> BTW, should we (can we?) make MakeAction<>() the only way to create >> actions? >> > > I suspect not - from an API design perspective it might be nice to be able > to test Actions in isolation without the Compilation (I assume this isn't > being done, because we don't unit test all that much - and I don't know the > APIs well enough to know if such testing makes sense (maybe Action and > Compilation are too tied together to do that separation anyway)) > (but if we wanted to, we could, by making each Action subclass's ctor private and friending Compilation from them - might be a bit repetitious though) > > >> >> >> http://reviews.llvm.org/D15911 >> >> >> >> _______________________________________________ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits