[clang] 6f31908 - [StaticAnalyzer] Modernize InvalidationInfo (NFC)

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


Author: Kazu Hirata
Date: 2023-08-20T22:08:04-07:00
New Revision: 6f31908d20131953b266f44a05b93971475dd2ad

URL: https://github.com/llvm/llvm-project/commit/6f31908d20131953b266f44a05b93971475dd2ad
DIFF: https://github.com/llvm/llvm-project/commit/6f31908d20131953b266f44a05b93971475dd2ad.diff

LOG: [StaticAnalyzer] Modernize InvalidationInfo (NFC)

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
index 3496af731aa683..f0276a57bdf98e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
@@ -64,12 +64,12 @@ class IvarInvalidationCheckerImpl {
 
   struct InvalidationInfo {
     /// Has the ivar been invalidated?
-    bool IsInvalidated;
+    bool IsInvalidated = false;
 
     /// The methods which can be used to invalidate the ivar.
     MethodSet InvalidationMethods;
 
-    InvalidationInfo() : IsInvalidated(false) {}
+    InvalidationInfo() = default;
     void addInvalidationMethod(const ObjCMethodDecl *MD) {
       InvalidationMethods.insert(MD);
     }


        


More information about the cfe-commits mailing list