Files
clang-p2996/clang/test/Analysis/iterator-range.cpp
Balazs Benics 985e399647 [analyzer] Fix assertion on casting SVal to NonLoc inside the IteratorRange checker
The checker assumed that it could safely cast an SVal to Nonloc.
This surfaced because, with std::ranges, we can unintentionally match
on other APIs as well, thus increasing the likelihood of violating
checker assumptions about the context it's invoked.
https://godbolt.org/z/13vEb3K76

See the discourse post on CallDescriptions and std::ranges here.
https://discourse.llvm.org/t/calldescriptions-should-not-skip-the-ranges-part-in-std-names-when-matching/73076

Fixes https://github.com/llvm/llvm-project/issues/65009

Differential Revision: https://reviews.llvm.org/D158968
2023-08-28 12:02:48 +02:00

28 KiB