[clang] [clang] Extend -Wunused-but-set-variable to static globals (PR #178342)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 21 00:26:40 PST 2026


================
@@ -1212,6 +1212,16 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
       && !isFileVarDecl();
   }
 
+  /// Returns true if a variable is a static file-scope variable.
+  bool isStaticFileVar() const {
----------------
zwuis wrote:

Remove unused function.

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


More information about the cfe-commits mailing list