Skip to content

Conversation

@tbaederr
Copy link
Contributor

@tbaederr tbaederr commented Feb 25, 2025

Looks like this was accidentally added after the bitfield and thus didn't work.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Feb 25, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 25, 2025

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

Changes

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

1 Files Affected:

  • (modified) clang/lib/AST/ByteCode/Descriptor.h (+2-1)
diff --git a/clang/lib/AST/ByteCode/Descriptor.h b/clang/lib/AST/ByteCode/Descriptor.h
index 01fa4b198de67..57940e45b8ae3 100644
--- a/clang/lib/AST/ByteCode/Descriptor.h
+++ b/clang/lib/AST/ByteCode/Descriptor.h
@@ -95,7 +95,8 @@ struct InlineDescriptor {
   /// Flag indicating if the field is the active member of a union.
   LLVM_PREFERRED_TYPE(bool)
   unsigned IsActive : 1;
-  /// Flat indicating if this field is in a union (even if nested).
+  /// Flag indicating if this field is in a union (even if nested).
+  LLVM_PREFERRED_TYPE(bool)
   unsigned InUnion : 1;
   LLVM_PREFERRED_TYPE(bool)
   /// Flag indicating if the field is mutable (if in a record).

Copy link
Collaborator

@shafik shafik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please add a more detailed summary something along the lines of Added LLVM_PREFERRED_TYPE to InUnion field of InlineDescriptor would be sufficient.

@tbaederr
Copy link
Contributor Author

LGTM but please add a more detailed summary something along the lines of Added LLVM_PREFERRED_TYPE to InUnion field of InlineDescriptor would be sufficient.

Does this help at all? The patch is pretty obvious and I don't think it clears things up if I explain a single-line change a second time.

@tbaederr tbaederr changed the title [clang][bytecode][NFC] Add missing LLVM_PREFERRED_TYPE to bitfield [clang][bytecode][NFC] Move incorrect LLVM_PREFERRED_TYPE attribute Mar 3, 2025
@tbaederr tbaederr merged commit 4dd29eb into llvm:main Mar 3, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants