[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)
Tyler Rockwood via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 21 12:06:52 PST 2023
================
@@ -54,6 +55,7 @@ class MiscModule : public ClangTidyModule {
CheckFactories.registerCheck<MisleadingIdentifierCheck>(
"misc-misleading-identifier");
CheckFactories.registerCheck<MisplacedConstCheck>("misc-misplaced-const");
+ CheckFactories.registerCheck<MustUseCheck>("misc-must-use");
----------------
rockwotj wrote:
Is there a difference between isReferenced versus the following:
```
decl().bind("var"), hasAncestor(functionDecl(unless(hasDescendant(declRefExpr(to(decl(equalsBoundNode("var"))))))))
```
Sorry still new to AST matchers
https://github.com/llvm/llvm-project/pull/76101
More information about the cfe-commits
mailing list