[clangd] Fix null check in FindTarget.

I've hit this stack trace a few times but don't have a good reproducer.
The code is unsafe by inspection, though.
This commit is contained in:
Sam McCall 2020-01-29 02:01:42 +01:00
parent d966bf830f
commit 9a5c448a31
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ public:
}
void add(const Decl *Dcl, RelSet Flags) {
const NamedDecl *D = llvm::dyn_cast<NamedDecl>(Dcl);
const NamedDecl *D = llvm::dyn_cast_or_null<NamedDecl>(Dcl);
if (!D)
return;
debug(*D, Flags);