[PATCH] D157252: [clang][ExprConst] Handle 0 type size in builtin_memcpy etc.

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 22 13:52:37 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/AST/ExprConstant.cpp:9512
     uint64_t TSize = Info.Ctx.getTypeSizeInChars(T).getQuantity();
+    if (TSize == 0)
+      return false;
----------------
I think we should issue a diagnostic, we don't have any indication that this is failing, let alone because the destination object size is zero. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157252



More information about the cfe-commits mailing list