Skip to content

Commit

Permalink
[clang][NFC] Annotate DeclBase.h with preferred_type
Browse files Browse the repository at this point in the history
This patch adds `preferred_type` annotations to `Decl` and `DeclContext` bit-fields. Those annotations help debuggers reason about the type of the value stored in bit-field.
  • Loading branch information
Endilll committed Nov 4, 2023
1 parent 6883343 commit 0fea0d2
Showing 1 changed file with 109 additions and 2 deletions.

2 comments on commit 0fea0d2

@aeubanks
Copy link
Contributor

Choose a reason for hiding this comment

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

this is still causing warnings like

../../clang/include/clang/AST/DeclBase.h:1932:25: warning: underlying type 'int' of enumeration 'LinkageSpecLanguageIDs' doesn't match bit-field type 'unsigned long' [-Wbitfield-type]
 1932 |     LLVM_PREFERRED_TYPE(LinkageSpecLanguageIDs)

@Endilll
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You should upgrade your nightly build so that it includes 98da183 which removes this diagnostic.

Please sign in to comment.