Author: Timm Baeder Date: 2026-06-22T10:31:54+02:00 New Revision: 0972d5c5c11a5dfd8c6a60ef018129157522e139
URL: https://github.com/llvm/llvm-project/commit/0972d5c5c11a5dfd8c6a60ef018129157522e139 DIFF: https://github.com/llvm/llvm-project/commit/0972d5c5c11a5dfd8c6a60ef018129157522e139.diff LOG: [clang][NFC] Add LLVM_PREFERRED_TYPE to EvaluatedStmt bitfields (#205026) Added: Modified: clang/include/clang/AST/Decl.h Removed: ################################################################################ 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; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
