[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 19 23:51:05 PDT 2021
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 wrote:
> sammccall wrote:
> > kadircet wrote:
> > > not sure if this comment will stay useful.
> > I want a comment to avoid a chesterton's fence:
> > - the motivation for doing something lazy is that this is really rare
> > - it's sensible to revisit this if it stops being rare
> >
> > Reworded it to make this more explicit.
> coverity is complaining that the for loop will never execute more than once, would it be worth refactoring?
> ```
> if (!Docs.empty) {
> const auto *D = Docs[0];
> ...
> }
> ```
Sure, done in eabb1f0732ac5e20d2e169024befaf2e9f166a8d
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107703/new/
https://reviews.llvm.org/D107703
More information about the cfe-commits
mailing list