Skip to content
Unverified Commit 5bd0f0d9 authored by Björn Pettersson's avatar Björn Pettersson Committed by GitHub
Browse files

[clangd] Check for valid location in ExtractionContext::exprIsValidOutside (#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).
parent 539c1c02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment