Make C10_NODISCARD macro more portable for nvcc+clang. (#20324)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20324
ghimport-source-id: e51181c82f87c946b5ffcb87b0ad71a056cb4659
Differential Revision: D15359317
Pulled By: ezyang
fbshipit-source-id: d88798f13a61c74456641ddec8250c08ce8af240