[PATCH] D71403: [clangd] Fix hover crashing on null types
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 12 02:37:09 PST 2019
kadircet marked 3 inline comments as done.
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/Hover.cpp:251
QualType T = E->getType();
- if (T->isFunctionType() || T->isFunctionPointerType() ||
+ if (T.isNull() || T->isFunctionType() || T->isFunctionPointerType() ||
T->isFunctionReferenceType())
----------------
ilya-biryukov wrote:
> NIT: Replace `T.isNull()` with `!T`
I don't think `!` is defined for `QualType`.
================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:517
+ void boom(int name) {
+ new Tmpl<A>([[na^me]]);
+ })cpp",
----------------
ilya-biryukov wrote:
> Why is the type null here?
because parentlistexprs, as you've noticed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71403/new/
https://reviews.llvm.org/D71403
More information about the cfe-commits
mailing list