[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:4231 + // Only look at the first documentation if there are several. + // (As of now, only one attribute has multiple documentation entries). + break; RKSimon wr

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-19 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:4231 + // Only look at the first documentation if there are several. + // (As of now, only one attribute has multiple documentation entries). + break; sammccall wr

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D107703#2942853 , @thakis wrote: > The docs are in rST format. Is that the format LSP wants? Not really :-) LSP's favorite would be markdown. But we're used to ingesting comments in unknown formats and trying to make sense

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Also, I tweaked the tablegen bits a bit to be more like all the other tablegen bits in 189911203779e793cb7767ad233d9994a88c7ea3 . Hope that's ok :) Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The docs are in rST format. Is that the format LSP wants? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107703/new/ https://reviews.llvm.org/D107703 ___ cfe-commits mailing list c

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sammccall marked 3 inline comments as done. Closed by commit rG18f9e25ce1fa: [AST][clangd] Expose documentation of Attrs on hover. (authored by sammccall). Changed pri

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 9 inline comments as done. sammccall added inline comments. Comment at: clang/unittests/AST/AttrTest.cpp:19 +TEST(Attr, Doc) { + EXPECT_THAT(Attr::getDocumentation(attr::Used), + testing::HasSubstr("The compiler must emit the definition even " -

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/unittests/AST/AttrTest.cpp:19 +TEST(Attr, Doc) { + EXPECT_THAT(Attr::getDocumentation(attr::Used), + testing::HasSubstr("The compiler must emit the definition even " It seems this is failing the

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. thanks, LG from my side as well, just a couple of clarification questions regarding tablegen. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:2389 + HI.Documentation = Attr::getDocumentation(attr:

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107703/new/ https://reviews.llvm.org/D107703 ___ cfe-commits mailing list

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 365601. sammccall added a comment. Oops, I'm just bad at git. Here's the test file! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107703/new/ https://reviews.llvm.org/D107703 Files: clang-tools-extra/clang

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 365585. sammccall added a comment. Oops, forgot test file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107703/new/ https://reviews.llvm.org/D107703 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/unittests/AST/CMakeLists.txt:18 ASTVectorTest.cpp + AttrTest.cpp CommentLexer.cpp I don't think this new file got attached to the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 365499. sammccall added a comment. add unit test for getDocumentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107703/new/ https://reviews.llvm.org/D107703 Files: clang-tools-extra/clangd/Hover.cpp

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D107703#2937183 , @aaron.ballman wrote: > This generally LGTM but the only other thing I'm wondering is whether there > should be any clang-specific testing Makes sense. Here the "clang feature" is just the API, so I've ad

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. This generally LGTM but the only other thing I'm wondering is whether there should be any clang-specific testing for this functionality. Right now, it relies on running the clang

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:4220 + )cpp"; + std::vector Attrs = Records.getAllDerivedDefinitions("Attr"); + for (const auto *A : Attrs) { aaron.ballman wrote: > FWIW, this will miss `omp::sequence` and

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 365461. sammccall marked an inline comment as done. sammccall added a comment. Change assertion to defensive check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107703/new/ https://reviews.llvm.org/D107703 F

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:4220 + )cpp"; + std::vector Attrs = Records.getAllDerivedDefinitions("Attr"); + for (const auto *A : Attrs) { FWIW, this will miss `omp::sequence` and `omp::directive`,

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: aaron.ballman, kadircet. Herald added subscribers: usaxena95, arphaman, mgorny. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added projects: clang, clang-tools-extra. T