[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 22 08:07:23 PDT 2025


================
@@ -3646,6 +3646,14 @@ def Unavailable : InheritableAttr {
   let MeaningfulToClassTemplateDefinition = 1;
 }
 
+def CanDiscard : InheritableAttr {
+  let Spellings = [CXX11<"clang", "candiscard">,
+                   GCC<"candiscard">];
----------------
yronglin wrote:

Does GCC support this attribute?

https://github.com/llvm/llvm-project/pull/154943


More information about the cfe-commits mailing list