[clang] b32dfd9 - [ASTMatchers] Modernize TimeBucketRegion (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 27 16:14:03 PDT 2023


Author: Kazu Hirata
Date: 2023-08-27T16:13:48-07:00
New Revision: b32dfd98bfe78d06705f993d91a1110d2457c830

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

LOG: [ASTMatchers] Modernize TimeBucketRegion (NFC)

Added: 
    

Modified: 
    clang/lib/ASTMatchers/ASTMatchFinder.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
index a27fac62bdef38..f9bd1354fa8dc4 100644
--- a/clang/lib/ASTMatchers/ASTMatchFinder.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
@@ -979,7 +979,7 @@ class MatchASTVisitor : public RecursiveASTVisitor<MatchASTVisitor>,
 
   class TimeBucketRegion {
   public:
-    TimeBucketRegion() : Bucket(nullptr) {}
+    TimeBucketRegion() = default;
     ~TimeBucketRegion() { setBucket(nullptr); }
 
     /// Start timing for \p NewBucket.
@@ -1002,7 +1002,7 @@ class MatchASTVisitor : public RecursiveASTVisitor<MatchASTVisitor>,
     }
 
   private:
-    llvm::TimeRecord *Bucket;
+    llvm::TimeRecord *Bucket = nullptr;
   };
 
   /// Runs all the \p Matchers on \p Node.


        


More information about the cfe-commits mailing list