[clang] [clang][NFC] Refactor enums that hold size of `Type` and `DeclContext` bit-fields (PR #70296)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 05:37:27 PDT 2023


================
@@ -1739,10 +1734,8 @@ class DeclContext {
     uint64_t IsSimpleExplicit : 1;
   };
 
-  /// Number of non-inherited bits in CXXConstructorDeclBitfields.
-  enum {
-    NumCXXConstructorDeclBits = 64 - NumDeclContextBits - NumFunctionDeclBits
-  };
+  /// Number of inherited and non-inherited bits in CXXConstructorDeclBitfields.
+  enum { NumCXXConstructorDeclBits = 64 };
----------------
AaronBallman wrote:

```suggestion
  enum { NumCXXConstructorDeclBits = NumFunctionDeclBits + 20 };
```
For consistency with others?

https://github.com/llvm/llvm-project/pull/70296


More information about the cfe-commits mailing list