Author: Timm Bäder Date: 2023-09-13T14:20:10+02:00 New Revision: 05a11f3e6dc234582f18ffeeccec192251cc8b48
URL: https://github.com/llvm/llvm-project/commit/05a11f3e6dc234582f18ffeeccec192251cc8b48 DIFF: https://github.com/llvm/llvm-project/commit/05a11f3e6dc234582f18ffeeccec192251cc8b48.diff LOG: [clang][Sema][NFC] Add missing docs to some FieldDecl methods. Added: Modified: clang/include/clang/AST/Decl.h Removed: ################################################################################ diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index a4390052890fff1..c51b33c9e594a81 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -3058,12 +3058,16 @@ class FieldDecl : public DeclaratorDecl, public Mergeable<FieldDecl> { /// store the data for the anonymous union or struct. bool isAnonymousStructOrUnion() const; + /// Returns the expression that represents the bit width, if this field + /// is a bit field. For non-bitfields, this returns \c nullptr. Expr *getBitWidth() const { if (!BitField) return nullptr; return hasInClassInitializer() ? InitAndBitWidth->BitWidth : BitWidth; } + /// Computes the bit width of this field, if this is a bit field. + /// May not be called on non-bitfields. unsigned getBitWidthValue(const ASTContext &Ctx) const; /// Set the bit-field width for this member. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits