mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[[nodiscard]] should be applied to functions where discarding the return value is most likely a correctness issue. - https://libcxx.llvm.org/CodingGuidelines.html - https://wg21.link/expected.bad.void - https://wg21.link/expected.bad - https://wg21.link/expected.expected - https://wg21.link/expected.void - https://wg21.link/expected.unexpected It was already discussed not to mark the type `std::expected` as `[[nodiscard]]` see: https://github.com/llvm/llvm-project/pull/139651 https://github.com/llvm/llvm-project/pull/130820 Also: https://github.com/llvm/llvm-project/pull/154943