[PATCH] D23325: [WIP] Binding of references to packed fields

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 11:44:05 PST 2016


aaron.ballman added inline comments.


================
Comment at: include/clang/AST/Decl.h:2388
+  /// its alignment is smaller than the alignment of its field type.
+  bool isPackedField(const ASTContext& context) const;
+
----------------
Should be `&Context` instead of `& context`.


================
Comment at: include/clang/AST/Expr.h:412
 
+  /// States that this object is ordinary, packed field or bitfield
   bool isOrdinaryOrBitFieldObject() const {
----------------
bit-field instead of bitfield (we're starting to standardize on the spelling used by the standards).


================
Comment at: include/clang/AST/Expr.h:432
   ///
-  /// In C++, whether a gl-value refers to a bitfield is essentially
+  /// In C++, whether a glvalue refers to a itfield is essentially
   /// an aspect of the value-kind type system.
----------------
typo: bit-field.


================
Comment at: include/clang/AST/Expr.h:440
+  ///
+  /// Like bitfields, we model glvalues referring to packed fields as
+  /// an aspect of the object kind type system.
----------------
s/bitfields/bit-fields


================
Comment at: include/clang/Basic/Specifiers.h:126
 
+    /// A packed-field is a field on a C or C++ packed record.
+    OK_PackedField,
----------------
Remove the hyphen from packed-field.


================
Comment at: lib/Sema/SemaInit.cpp:4459
+    if (RefRelationship == Sema::Ref_Compatible)
+    {
+      if (Initializer->refersToPackedField()) {
----------------
Move the brace to the preceding line.


https://reviews.llvm.org/D23325





More information about the cfe-commits mailing list