[clang] 7c30d30 - [clang] Modernize DelayedDiagnostics (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 23:29:20 PDT 2023


Author: Kazu Hirata
Date: 2023-04-26T23:29:03-07:00
New Revision: 7c30d3028b2cc0bea7858f995f9bb4024ad1d7d0

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

LOG: [clang] Modernize DelayedDiagnostics (NFC)

Added: 
    

Modified: 
    clang/include/clang/Sema/Sema.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 0b324bc54c32e..a25dfb7434cf0 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -946,10 +946,10 @@ class Sema final {
   class DelayedDiagnostics {
     /// The current pool of diagnostics into which delayed
     /// diagnostics should go.
-    sema::DelayedDiagnosticPool *CurPool;
+    sema::DelayedDiagnosticPool *CurPool = nullptr;
 
   public:
-    DelayedDiagnostics() : CurPool(nullptr) {}
+    DelayedDiagnostics() = default;
 
     /// Adds a delayed diagnostic.
     void add(const sema::DelayedDiagnostic &diag); // in DelayedDiagnostic.h


        


More information about the cfe-commits mailing list