[clang] b985d41 - [clang][NFC] Annotate `ExprConstant.cpp` with `preferred_type`

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 11 03:59:44 PST 2024


Author: Vlad Serebrennikov
Date: 2024-02-11T14:59:33+03:00
New Revision: b985d4179a882892ce009fb3668cdc917e27f5d5

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

LOG: [clang][NFC] Annotate `ExprConstant.cpp` with `preferred_type`

This helps debuggers to display values in bit-fields in a more helpful way.

Added: 
    

Modified: 
    clang/lib/AST/ExprConstant.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 02e153ff10737c..33ad94e6795c83 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -240,15 +240,19 @@ namespace {
     /// True if the subobject was named in a manner not supported by C++11. Such
     /// lvalues can still be folded, but they are not core constant expressions
     /// and we cannot perform lvalue-to-rvalue conversions on them.
+    LLVM_PREFERRED_TYPE(bool)
     unsigned Invalid : 1;
 
     /// Is this a pointer one past the end of an object?
+    LLVM_PREFERRED_TYPE(bool)
     unsigned IsOnePastTheEnd : 1;
 
     /// Indicator of whether the first entry is an unsized array.
+    LLVM_PREFERRED_TYPE(bool)
     unsigned FirstEntryIsAnUnsizedArray : 1;
 
     /// Indicator of whether the most-derived object is an array element.
+    LLVM_PREFERRED_TYPE(bool)
     unsigned MostDerivedIsArrayElement : 1;
 
     /// The length of the path to the most-derived object of which this is a


        


More information about the cfe-commits mailing list