[Testing] Move clangd::Annotations to llvm testing support
authorIlya Biryukov <ibiryukov@google.com>
Thu, 25 Apr 2019 10:08:31 +0000 (10:08 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Thu, 25 Apr 2019 10:08:31 +0000 (10:08 +0000)
commit6fae38ec9100f0ad8b2c0352bae90aa64383172b
tree925cfed364430337af97984d5e274e6c7903091a
parent45d042ed961a04b641eac99584b045de27388708
[Testing] Move clangd::Annotations to llvm testing support

Summary:
Annotations allow writing nice-looking unit test code when one needs
access to locations from the source code, e.g. running code completion
at particular offsets in a file. See comments in Annotations.cpp for
more details on the API.

Also got rid of a duplicate annotations parsing code in clang's code
complete tests.

Reviewers: gribozavr, sammccall

Reviewed By: gribozavr

Subscribers: mgorny, hiraditya, ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 359179
clang-tools-extra/unittests/clangd/Annotations.cpp
clang-tools-extra/unittests/clangd/Annotations.h
clang/unittests/Sema/CMakeLists.txt
clang/unittests/Sema/CodeCompleteTest.cpp
llvm/include/llvm/Testing/Support/Annotations.h [new file with mode: 0644]
llvm/lib/Testing/Support/Annotations.cpp [new file with mode: 0644]
llvm/lib/Testing/Support/CMakeLists.txt
llvm/unittests/Support/AnnotationsTest.cpp [new file with mode: 0644]
llvm/unittests/Support/CMakeLists.txt