[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 22 08:05:46 PDT 2025
================
@@ -199,6 +199,10 @@ Removed Compiler Flags
Attribute Changes in Clang
--------------------------
+- A new attribute ``[[clang::candiscard]]`` can be applied to a function returning a nodiscard type
----------------
yronglin wrote:
What do you think of a shorter name `[[clang::discard]]`? I have no preference for this。
https://github.com/llvm/llvm-project/pull/154943
More information about the cfe-commits
mailing list