[PATCH] D69664: [Diagnostics] Teach -Wnull-dereference about address_space attribute
Leonard Chan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 18:03:32 PST 2019
leonardchan added a comment.
Yup, a bisect shows it was this patch that caused it. I filed a bug for tracking at https://bugs.llvm.org/show_bug.cgi?id=43950 and attached a reproducer. Could you look into this? Thanks.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:487
+ const LangAS AS =
+ UO->getSubExpr()->getType()->getPointeeType().getAddressSpace();
+ if ((!isTargetAddressSpace(AS) ||
----------------
If I were to guess what would cause the segfault, I'd probably think it was the `getPointeeType().getAddressSpace()` in the event the type isn't actually a pointer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69664/new/
https://reviews.llvm.org/D69664
More information about the cfe-commits
mailing list