[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 3 14:55:43 PST 2021
cjdb added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:10326
+ !isa<IntegerLiteral>(
+ Cast->getSubExpr()->IgnoreImplicitAsWritten()->IgnoreParens()))
+ return;
----------------
thakis wrote:
> cjdb wrote:
> > cjdb wrote:
> > > aaron.ballman wrote:
> > > > I'm not 100% certain, but would `IgnoreParenImpCasts()` be sufficient here? (`IgnoreImplicitAsWritten() seems to be a bit special -- the only use of it I can find in tree is for rewritten binary operator expressions.)
> > > @rsmith would you mind weighing in here please? My original use-case for `IgnoreImplicitAsWritten` might be different to here and I don't have an answer for @aaron.ballman.
> > I've tried out `IgnoreParenImpCasts` and it seems to work, but I'd appreciate an answer here for future patches please.
> Can you rephrase your question? I'm not sure what exactly you want to know.
Richard suggested I use `IgnoreImplicitAsWritten` in D94640, but it's apparently unnecessary in D97512. I'd like to better understand when to use `IgnoreImplicitAsWritten`. (BTW this is non-blocking, so if there are no other comments that need addressing, I'd like to press forward please.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97512/new/
https://reviews.llvm.org/D97512
More information about the cfe-commits
mailing list