[PATCH] D55510: [ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 11 16:27:30 PST 2018
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/AST/ExprConstant.cpp:6147-6148
+ return ZeroInitialization(E);
+ if (!Result.checkNullPointerForFoldAccess(Info, E, AK_Read))
+ return false;
+ QualType CharTy =
----------------
hubert.reinterpretcast wrote:
> rsmith wrote:
> > Why do we need to do this explicitly, rather than allowing to simply happen as part of the first `handleLValueToRValueConversion` below?
> We want the error message to be produced even if we bail early on not having a valid designator.
If we have an invalid designator, we already produced a diagnostic when setting it invalid, and generally don't need to diagnose anything else.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55510/new/
https://reviews.llvm.org/D55510
More information about the cfe-commits
mailing list