[clang] 760e0c3 - [StaticAnalyzer] Modernize CFNumberChecker (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 20 22:08:14 PDT 2023


Author: Kazu Hirata
Date: 2023-08-20T22:08:01-07:00
New Revision: 760e0c353787d73a02c609d8abed7ed75baed7df

URL: https://github.com/llvm/llvm-project/commit/760e0c353787d73a02c609d8abed7ed75baed7df
DIFF: https://github.com/llvm/llvm-project/commit/760e0c353787d73a02c609d8abed7ed75baed7df.diff

LOG: [StaticAnalyzer] Modernize CFNumberChecker (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 4a5b8913c22fd6..93679a86966f45 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -352,9 +352,9 @@ void NilArgChecker::checkPostStmt(const ObjCDictionaryLiteral *DL,
 namespace {
 class CFNumberChecker : public Checker< check::PreStmt<CallExpr> > {
   mutable std::unique_ptr<APIMisuse> BT;
-  mutable IdentifierInfo *ICreate, *IGetValue;
+  mutable IdentifierInfo *ICreate = nullptr, *IGetValue = nullptr;
 public:
-  CFNumberChecker() : ICreate(nullptr), IGetValue(nullptr) {}
+  CFNumberChecker() = default;
 
   void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
 };


        


More information about the cfe-commits mailing list