[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

Christopher Di Bella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 11:12:11 PST 2021


cjdb marked an inline comment as done.
cjdb added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:10326
+      !isa<IntegerLiteral>(
+          Cast->getSubExpr()->IgnoreImplicitAsWritten()->IgnoreParens()))
+    return;
----------------
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.


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