[PATCH] D41432: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 08:03:40 PST 2017


sammccall marked 2 inline comments as done.
sammccall added inline comments.


================
Comment at: unittests/clangd/Annotations.h:12
+//
+//    Annotations Example(R"cpp(
+//       int complete() { x.pri^ }          // ^ indicates a point
----------------
ioeric wrote:
> Does this support overlapping annotations like (named) points in (named) ranges?
Yes - ranges can be nested, but not "overlapping" like `[a(b]c)`.
Added a comment.


================
Comment at: unittests/clangd/Annotations.h:45
+  // Crashes if there isn't exactly one.
+  Position point(llvm::StringRef Name = "") const;
+  // Returns the position of all points marked by ^ (or $name^) in the text.
----------------
ioeric wrote:
> Is this the position in the stripped code or the original text?
In the stripped code, which is what you'll feed to the compiler. Added a comment.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41432





More information about the cfe-commits mailing list