================
@@ -85,6 +90,28 @@ void IdentifierLengthCheck::registerMatchers(MatchFinder 
*Finder) {
         this);
 }
 
+static unsigned countLinesToLastUse(const VarDecl *Var,
+                                    const SourceManager *SrcMgr,
+                                    ASTContext *Ctx) {
+  const auto *ParentScope = 
llvm::dyn_cast<FunctionDecl>(Var->getDeclContext());
+  if (ParentScope == nullptr) {
+    return 1;
+  }
----------------
vbvictor wrote:

I think this check designed to handle globlas as well

https://github.com/llvm/llvm-project/pull/185319
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to