[clang] 519ea98 - [Sema] Modernize VirtSpecifiers (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 19 00:27:20 PDT 2023


Author: Kazu Hirata
Date: 2023-08-19T00:27:09-07:00
New Revision: 519ea98044127a0abd8f0648404ae55ce2c05c70

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

LOG: [Sema] Modernize VirtSpecifiers (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h
index c63378c732908d..4a5d7145803979 100644
--- a/clang/include/clang/Sema/DeclSpec.h
+++ b/clang/include/clang/Sema/DeclSpec.h
@@ -2705,7 +2705,7 @@ class VirtSpecifiers {
     VS_Abstract = 16
   };
 
-  VirtSpecifiers() : Specifiers(0), LastSpecifier(VS_None) { }
+  VirtSpecifiers() = default;
 
   bool SetSpecifier(Specifier VS, SourceLocation Loc,
                     const char *&PrevSpec);
@@ -2729,8 +2729,8 @@ class VirtSpecifiers {
   Specifier getLastSpecifier() const { return LastSpecifier; }
 
 private:
-  unsigned Specifiers;
-  Specifier LastSpecifier;
+  unsigned Specifiers = 0;
+  Specifier LastSpecifier = VS_None;
 
   SourceLocation VS_overrideLoc, VS_finalLoc, VS_abstractLoc;
   SourceLocation FirstLocation;


        


More information about the cfe-commits mailing list