llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/205026.diff


1 Files Affected:

- (modified) clang/include/clang/AST/Decl.h (+16-8) 


``````````diff
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index e0623d0cb324d..e200b8f06ec4b 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -884,31 +884,39 @@ class DeclaratorDecl : public ValueDecl {
 /// is an integral constant expression (if known).
 struct EvaluatedStmt {
   /// Whether this statement was already evaluated.
-  bool WasEvaluated : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned WasEvaluated : 1;
 
   /// Whether this statement is being evaluated.
-  bool IsEvaluating : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned IsEvaluating : 1;
 
   /// Whether this variable is known to have constant initialization. This is
   /// currently only computed in C++, for static / thread storage duration
   /// variables that might have constant initialization and for variables that
   /// are usable in constant expressions.
-  bool HasConstantInitialization : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned HasConstantInitialization : 1;
 
   /// Whether this variable is known to have constant destruction. That is,
   /// whether running the destructor on the initial value is a side-effect
   /// (and doesn't inspect any state that might have changed during program
   /// execution). This is currently only computed if the destructor is
   /// non-trivial.
-  bool HasConstantDestruction : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned HasConstantDestruction : 1;
 
   /// In C++98, whether the initializer is an ICE. This affects whether the
   /// variable is usable in constant expressions.
-  bool HasICEInit : 1;
-  bool CheckedForICEInit : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned HasICEInit : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned CheckedForICEInit : 1;
 
-  bool HasSideEffects : 1;
-  bool CheckedForSideEffects : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned HasSideEffects : 1;
+  LLVM_PREFERRED_TYPE(bool)
+  unsigned CheckedForSideEffects : 1;
 
   LazyDeclStmtPtr Value;
   APValue Evaluated;

``````````

</details>


https://github.com/llvm/llvm-project/pull/205026
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to