[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In general, I think this approach is defensible. Though I do wonder if we want to put an assert in the check functions to assert that the command is what you'd expect, so someone calling the check functions incorrectly will get some early feedback. WDYT? ==

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2022-05-11 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Herald added a project: All. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113793/new/ https://reviews.llvm.org/D113793 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2022-01-31 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 404689. aaronpuchert added a comment. Apply `clang-format`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113793/new/ https://reviews.llvm.org/D113793 Files: clang/include/clang/AST/CommentSema.h clan

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2021-11-18 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D113793#3137244 , @gribozavr2 wrote: > I find the code more readable and robust when the `check*` function checks > its applicability itself. After this refactoring, it is not so clear when > each check functions applie

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2021-11-17 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. I find the code more readable and robust when the `check*` function checks its applicability itself. After this refactoring, it is not so clear when each check functions applies, what are the correct conditions to call them. To ensure correct usage, probably we shoul

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2021-11-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Forget to run `clang-format`, will do this when I have to update or land. Comment at: clang/lib/AST/CommentSema.cpp:628 -void Sema::checkBlockCommandDuplicate(const BlockCommandComment *Command) { - const CommandInfo *Info = Traits.getCommandInf

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2021-11-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added a reviewer: gribozavr2. aaronpuchert requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead of checking within the checks whether they apply, we check before calling them. This allows