Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clangd] Check for valid location in ExtractionContext::exprIsValidOu…
…tside (#71162) If the code has a call to an implicitly declared function, an expression could end up referencing declarations without valid source locations. So when doing the exprIsValidOutside check we could end up calling SourceManager::isPointWithin using invalid source locations, and then a debug build would crash with an assertion failure in SourceManager::isBeforeInTranslationUnit. This patch make sure that we deal with the invalid locations (by considering a ReferencedDecl with invalid location as not being inside the Scope).
- Loading branch information