Commit f8514f04 authored by Arseniy Zaostrovnykh's avatar Arseniy Zaostrovnykh Committed by Tom Stellard
Browse files

Fix assertion failure "PathDiagnosticSpotPiece's must have a valid location."...

Fix assertion failure "PathDiagnosticSpotPiece's must have a valid location." in ReturnPtrRange checker on builtin functions

Builtin functions (such as `std::move`, `std::forward`, `std::as_const`)
have a body generated during the analysis not related to any source file
so their statements have no valid source locations.
`ReturnPtrRange` checker should not report issues for these builtin
functions because they only forward its parameter and do not create any
new pointers.

Fixes #55347

Patch by Arseniy Zaostrovnykh.

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D138713

(cherry picked from commit 98d55095)
parent 3bb5ebc4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment