================
@@ -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 agree we should omit warning on globals. Can we add docs for it and tests.
https://github.com/llvm/llvm-project/pull/185319
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits