[clang] 77604d2 - [StaticAnalyzer] Modernize ObjCNonNilReturnValueChecker (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 4 13:35:35 PDT 2023
Author: Kazu Hirata
Date: 2023-09-04T13:35:25-07:00
New Revision: 77604d2a845217cb6d793530c4819dc63bfd61d3
URL: https://github.com/llvm/llvm-project/commit/77604d2a845217cb6d793530c4819dc63bfd61d3
DIFF: https://github.com/llvm/llvm-project/commit/77604d2a845217cb6d793530c4819dc63bfd61d3.diff
LOG: [StaticAnalyzer] Modernize ObjCNonNilReturnValueChecker (NFC)
Added:
Modified:
clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
Removed:
################################################################################
diff --git a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
index 0fb3506eb6e5698..5e25153a148fea1 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -1145,13 +1145,13 @@ class ObjCNonNilReturnValueChecker
check::PostStmt<ObjCArrayLiteral>,
check::PostStmt<ObjCDictionaryLiteral>,
check::PostStmt<ObjCBoxedExpr> > {
- mutable bool Initialized;
+ mutable bool Initialized = false;
mutable Selector ObjectAtIndex;
mutable Selector ObjectAtIndexedSubscript;
mutable Selector NullSelector;
public:
- ObjCNonNilReturnValueChecker() : Initialized(false) {}
+ ObjCNonNilReturnValueChecker() = default;
ProgramStateRef assumeExprIsNonNull(const Expr *NonNullExpr,
ProgramStateRef State,
More information about the cfe-commits
mailing list