[PATCH] D146039: [libclang] No longer attempt to get a dependent bit-width

Igor Kushnir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 06:27:16 PDT 2023


vedgy added inline comments.


================
Comment at: clang/include/clang-c/Index.h:3043
+ * For example:
+ * if (clang_Cursor_isBitField(Cursor)) {
+ *   int Width = clang_getFieldDeclBitWidth(Cursor);
----------------
Surround the example with ` \code` and `\endcode` commands.


================
Comment at: clang/include/clang-c/Index.h:3046
+ *   if (Width != -1) {
+ *     // The bit-field width is non-dependent.
+ *   }
----------------
"non-dependent" is unclear to me. How about rewording to:
```
 *   int Width = clang_getFieldDeclBitWidth(Cursor);
 *   if (Width == -1) {
 *     // The bit-field width depends on a template parameter.
```
or alternatively more specific standardese:
```
 *     // The bit-field width is [not] value-dependent.
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146039/new/

https://reviews.llvm.org/D146039



More information about the cfe-commits mailing list