[PATCH] D51437: [clangd] Report position of opening paren in singature help

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 30 02:21:39 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: unittests/clangd/CodeCompleteTests.cpp:914
 
+TEST(SignatureHelpTest, OpeningParen) {
+  Annotations Code(R"cpp(
----------------
sammccall wrote:
> Hmm, I think this test would be easier to follow if tests 1-5 were written separately - it's hard to spot all the locations and how the code interacts.
> 
> As a bonus, no need to mess around with explicit positions and the failure message can just echo the test:
> 
> ```
> for (const char* Test : {
>   R"cpp(
>     int foo(int a, b, c);
>     int main() { foo(foo$p^(foo(10, 10, 10), ^); }
>   )cpp",
>   ...
> }) {
>   EXPECT_EQ(signatures(Test).argListStart, Annotations(Test).point("p")) << Test;
> }
> ```
Thanks! It's way better this way!


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51437





More information about the cfe-commits mailing list