[PATCH] D40915: Always evaluate the second argument for CHECK() lazily.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 13:37:13 PST 2017


pcc added inline comments.


================
Comment at: lld/include/lld/Common/ErrorHandler.h:116
+
+#define CHECK(...) CHECK_FN(__VA_ARGS__, CHECK2, check1, dummy)(__VA_ARGS__)
+
----------------
Perhaps it would be better to support only the two-argument form via the `CHECK` macro? That would not only simplify the macro definition, but also if I look at a `check` call with a single argument, I can tell from the name that it is just a straightforward function call.


https://reviews.llvm.org/D40915





More information about the llvm-commits mailing list