[Support] Provide access to the full mapping in llvm::Annotations
authorEric Li <li.zhe.hua@gmail.com>
Fri, 16 Sep 2022 20:07:26 +0000 (16:07 -0400)
committerEric Li <li.zhe.hua@gmail.com>
Tue, 20 Sep 2022 15:06:21 +0000 (11:06 -0400)
commit86118ec2d0e9cf67a1036930d8b3a31a4e0b1744
tree54160b1682bf6af577368d88e37e8a3db3c2c02e
parentb982ba2a6e0f11340b4e75d1d4eba9ff62a81df7
[Support] Provide access to the full mapping in llvm::Annotations

Providing access to the mapping of annotations allows test helpers to
be expressive by using the annotations as expectations. For example, a
matcher could verify that all annotated points were matched by a
matcher, or that an refactoring surgically modifies specific ranges.

Differential Revision: https://reviews.llvm.org/D134072
llvm/include/llvm/Testing/Support/Annotations.h
llvm/lib/Testing/Support/Annotations.cpp
llvm/unittests/Support/AnnotationsTest.cpp