[PATCH] D54166: [AST] Store the string data in StringLiteral in a trailing array of chars

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 14 12:38:15 PST 2018


rjmccall added a comment.

IIRC, abbreviations just silently don't take effect if the record doesn't conform; so things will appear to work, but the size on disk will be bigger.



================
Comment at: include/clang/AST/Expr.h:1615
+  }
+
+  /// Build a string literal.
----------------
riccibruno wrote:
> Note that the trailing array of chars is aligned to 4 bytes
> since it is after the array of `SourceLocation`.
> Therefore I believe that the `uint16_t *` and `uint32_t *`
> point to properly aligned memory. However I can add an
> assertion here if needed.
I think it's fine.


Repository:
  rC Clang

https://reviews.llvm.org/D54166





More information about the cfe-commits mailing list