File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ Checks: >
99 -bugprone-narrowing-conversions,
1010 -bugprone-unchecked-optional-access,
1111 -bugprone-unused-return-value,
12+ cppcoreguidelines-init-variables,
13+ cppcoreguidelines-missing-std-forward,
14+ cppcoreguidelines-rvalue-reference-param-not-moved,
15+ cppcoreguidelines-virtual-class-destructor,
1216 misc-const-correctness,
1317 modernize-*,
1418 -modernize-avoid-c-arrays,
Original file line number Diff line number Diff line change @@ -266,8 +266,8 @@ void UnsafeFunctionsCheck::registerMatchers(MatchFinder *Finder) {
266266}
267267
268268void UnsafeFunctionsCheck::check (const MatchFinder::MatchResult &Result) {
269- const Expr *SourceExpr;
270- const FunctionDecl *FuncDecl;
269+ const Expr *SourceExpr = nullptr ;
270+ const FunctionDecl *FuncDecl = nullptr ;
271271
272272 if (const auto *DeclRef = Result.Nodes .getNodeAs <DeclRefExpr>(DeclRefId)) {
273273 SourceExpr = DeclRef;
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ void UseRangesCheck::check(const MatchFinder::MatchResult &Result) {
199199 if (!NodeStr.consume_front (FuncDecl))
200200 continue ;
201201 Function = Value.get <FunctionDecl>();
202- size_t Index;
202+ size_t Index = 0 ;
203203 if (NodeStr.getAsInteger (10 , Index)) {
204204 llvm_unreachable (" Unable to extract replacer index" );
205205 }
You can’t perform that action at this time.
0 commit comments