[PATCH] D16513: [Unittest] Clean up formatting, NFC
Joseph Tremoulet via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 29 04:34:54 PST 2016
JosephTremoulet added inline comments.
================
Comment at: unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp:327
@@ +326,3 @@
+ std::vector<llvm::Module *> Modules;
+ CompileLayer.addModuleSet(Modules, &Manager, &Resolver);
+
----------------
lhames wrote:
> dblaikie wrote:
> > I think I mentioned this during post-commit review, perhaps.
> >
> > It's probably possible to just write "{}" for the first parameter - skipping both the local variable and the inline construction. (though, FWIW, I'd probably take the inline construction over the named variable if those were the choices - but I can see the alternative point of view/wouldn't say it's clear cut either way)
> addModuleSet is a template method - there's no way for {}'s type to be deduced. Inline construction seems like an option though.
Yeah, sorry, I should have explained in a comment. As Lang said, it's a template method and the first argument's type is a template parameter, so `{}` defeats inference. That said, I could explicitly specify the template arguments rather than relying on deduction and then use `{}` -- would that be preferable? I just assumed this was preferable because explicitly specifying the parameters would still have the inline type expression, which I thought was what you were objecting to, though clearly I've misunderstood your intent if the inline constructor is now preferable...
http://reviews.llvm.org/D16513
More information about the llvm-commits
mailing list