summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2020-01-03 17:26:33 +0100
committerSam McCall <sam.mccall@gmail.com>2020-01-03 18:18:40 +0100
commitf06f439fadf740ea9019f2eb7f26ff88198ed375 (patch)
tree3fd67a55947d42c7ac35e803cd766617b0819b66 /llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
parentadd743b4348095c0d2e407c7a2b8a87a5f8194b0 (diff)
downloadbcm5719-llvm-f06f439fadf740ea9019f2eb7f26ff88198ed375.tar.gz
bcm5719-llvm-f06f439fadf740ea9019f2eb7f26ff88198ed375.zip
[clangd] targetDecl() returns only NamedDecls.
Summary: While it's perfectly reasonable for non-named decls such as static_assert to resolve to themselves: - nothing else ever resolves to them - features based on references (hover, highlight, find refs etc) tend to be uninteresting where only trivial references are possible - returning NamedDecl is a more convenient API (we cast to it in many places) - this aligns closer to findExplicitReferences/explicitReferenceTargets This fixes a crash in explicitReferenceTargets: if the target is a non-named decl then there's an invalid unchecked cast to NamedDecl. In practice this means when hovering over e.g. a static_assert: - before ac3f9e4842, we would show a (boring) hover card - after ac3f9e4842, we would crash - after this patch, we will show nothing Reviewers: kadircet, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72163
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud