efriedma added a reviewer: aaron.ballman.
efriedma added inline comments.

================
Comment at: clang/lib/Sema/SemaType.cpp:2406
+
+  if (Size.isZero() || Size >= Context.getTypeAlignInChars(EltTy))
+    return false;
----------------
I think you need to check that the size is a multiple of the alignment, not 
just larger than the alignment.  (Those are only the same thing if the size is 
a power of two; it looks like you don't have any test coverage for 
non-power-of-two sizes.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133711

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to