[clang] e0f5031 - [clang] Modernize Vec (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 16 13:46:23 PDT 2023


Author: Kazu Hirata
Date: 2023-04-16T13:46:09-07:00
New Revision: e0f5031caec31480208a694f26ac4d22243d41ab

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

LOG: [clang] Modernize Vec (NFC)

Identified with modernize-use-default-member-init.

Added: 
    

Modified: 
    clang/include/clang/AST/APValue.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/APValue.h b/clang/include/clang/AST/APValue.h
index 4e22d6c8443c5..286c1a1b0941a 100644
--- a/clang/include/clang/AST/APValue.h
+++ b/clang/include/clang/AST/APValue.h
@@ -267,9 +267,9 @@ class APValue {
   };
   struct LV;
   struct Vec {
-    APValue *Elts;
-    unsigned NumElts;
-    Vec() : Elts(nullptr), NumElts(0) {}
+    APValue *Elts = nullptr;
+    unsigned NumElts = 0;
+    Vec() = default;
     ~Vec() { delete[] Elts; }
   };
   struct Arr {


        


More information about the cfe-commits mailing list