[clang] 17db462 - [clang][NFC] Annotate `TemplateBase.h` with `preferred_type`

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 5 22:46:56 PST 2023


Author: Vlad Serebrennikov
Date: 2023-11-06T09:46:41+03:00
New Revision: 17db462810436e6cb5c422208d0d7718a8adb168

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

LOG: [clang][NFC] Annotate `TemplateBase.h` with `preferred_type`

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/TemplateBase.h b/clang/include/clang/AST/TemplateBase.h
index 8e6b4d819740642..b7cd71f17c9442c 100644
--- a/clang/include/clang/AST/TemplateBase.h
+++ b/clang/include/clang/AST/TemplateBase.h
@@ -103,18 +103,23 @@ class TemplateArgument {
   /// The kind of template argument we're storing.
 
   struct DA {
+    LLVM_PREFERRED_TYPE(ArgKind)
     unsigned Kind : 31;
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsDefaulted : 1;
     void *QT;
     ValueDecl *D;
   };
   struct I {
+    LLVM_PREFERRED_TYPE(ArgKind)
     unsigned Kind : 31;
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsDefaulted : 1;
     // We store a decomposed APSInt with the data allocated by ASTContext if
     // BitWidth > 64. The memory may be shared between multiple
     // TemplateArgument instances.
     unsigned BitWidth : 31;
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsUnsigned : 1;
     union {
       /// Used to store the <= 64 bits integer value.
@@ -126,19 +131,25 @@ class TemplateArgument {
     void *Type;
   };
   struct A {
+    LLVM_PREFERRED_TYPE(ArgKind)
     unsigned Kind : 31;
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsDefaulted : 1;
     unsigned NumArgs;
     const TemplateArgument *Args;
   };
   struct TA {
+    LLVM_PREFERRED_TYPE(ArgKind)
     unsigned Kind : 31;
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsDefaulted : 1;
     unsigned NumExpansions;
     void *Name;
   };
   struct TV {
+    LLVM_PREFERRED_TYPE(ArgKind)
     unsigned Kind : 31;
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsDefaulted : 1;
     uintptr_t V;
   };


        


More information about the cfe-commits mailing list