sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clangd/Protocol.h:832 + + /// Position of the opening paren of the argument list. + /// This is a clangd-specific extension, it is only available via C++ API and ---------------- As noted offline, I misread this as being *inside* the paren - could maybe be more explicit? ```Position of the start of the argument list, including opening paren. e.g. foo("first arg", ^argListStart ^cursor ``` ================ Comment at: unittests/clangd/CodeCompleteTests.cpp:914 +TEST(SignatureHelpTest, OpeningParen) { + Annotations Code(R"cpp( ---------------- 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; } ``` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51437 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits