Convex functions on non-convex domains