[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 20 19:19:39 PST 2024


================
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc,
   }
 }
 
+template <typename AttrType>
+inline static bool HasAttribute(const QualType &T) {
----------------
erichkeane wrote:

Huh, that commit seems to be intentionally NO warning on unused private fields.  Are we sure we WANT this patch? 

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


More information about the cfe-commits mailing list