[PATCH] D58729: Emit boxed expression as a compile-time constant if the expression inside the parentheses is a string literal

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 28 14:47:06 PST 2019


ahatanak updated this revision to Diff 188794.
ahatanak marked 4 inline comments as done.
ahatanak added a comment.

Address review comments.

- Preserve sugar when creating an `ObjCBoxedExpr` in `Sema::BuildObjCBoxedExpr`.
- Add a test case to test/SemaObjC/boxing-illegal.m that shows clang rejects a string literal in a boxed expression if its character encoding is incompatible with UTF-8.


Repository:
  rC Clang

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

https://reviews.llvm.org/D58729

Files:
  include/clang/AST/ExprObjC.h
  lib/AST/ExprConstant.cpp
  lib/CodeGen/CGExprConstant.cpp
  lib/CodeGen/CGObjC.cpp
  lib/Sema/SemaExprObjC.cpp
  test/CodeGenObjC/boxing.m
  test/SemaObjC/boxing-illegal.m
  test/SemaObjC/objc-literal-sig.m
  test/SemaObjC/transfer-boxed-string-nullability.m
  test/SemaObjCXX/literals.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58729.188794.patch
Type: text/x-patch
Size: 11131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190228/ab0dcf0e/attachment-0001.bin>


More information about the cfe-commits mailing list