forked from OSchip/llvm-project
[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:
parent
d966bf830f
commit
9a5c448a31
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue