[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 19 12:34:52 PDT 2021
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 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];
...
}
```
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