Skip to content

Mark value-dependent bit-fields in a tooltip

Igor Kushnir requested to merge work/mark-value-dependent-bit-fields into master

Parsing value-dependent bit-fields may cause an assertion failure or a crash in libclang version < 17: https://bugs.kde.org/show_bug.cgi?id=438249
With newer or patched libclang versions, a value-dependent bit-field is indistinguishable from a data member that is not a bit-field.

Display " :[value-dependent]" in place of " :<bit-width>" after a value-dependent bit-field name in a tooltip. Alternatively the bit width expression that depends on a template parameter (actual code) could be displayed. But the meaning of code after a colon can be unclear to users. And I don't know how to retrieve this code.

Using this libclang API is discussed in comments to https://reviews.llvm.org/D130303

Before: before

After: boost-container-string.hpp

Edited by Igor Kushnir

Merge request reports