> On Mar 1, 2018, at 10:25 AM, Jim Ingham <jing...@apple.com> wrote: > > I have no general objections to macros, and reducing boiler-plate is good. > They do get in the way of debugging because of the weird C rule that a macro > has to pretend that it is all one source line, so if they contain code you > are interested in stopping at, there needs to be some other way to do that. > But provided that's taken care of, they are fine.
I believe the only thing that needs to be in a macro is the return, and all the other lines could be factored out into a helper function, in which you could then break, and it would reduce code size. Hmm.. if you can factor out the rest into a (templated) function, we probably don't even need to make this a macro: if (takeAndLogError(item)) return Error(); -- adrian > > Jim > > >> On Mar 1, 2018, at 10:16 AM, Zachary Turner via Phabricator >> <revi...@reviews.llvm.org> wrote: >> >> zturner added a comment. >> >> I'm also ok with not having the macro fwiw, just an idea to reduce >> boilerplate. >> >> >> https://reviews.llvm.org/D43912 >> >> >> > _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits