carlosgalvezp added inline comments.
================
Comment at:
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.cpp:31
+ const MatchFinder::MatchResult &Result) {
+ const auto *Param = Result.Nodes.getNodeAs<ParmVarDecl>("param");
+
----------------
Check for nullptr before dereferencing. Typically it's done like:
if (const auto *Param = Result.Nodes.getNodeAs<ParmVarDecl>("param"))
diag(Param->getBeginLoc(), ...);
================
Comment at:
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.h:31
+ void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
+ bool isLanguageVersionSupported(const LangOptions &LO) const override {
+ return LO.CPlusPlus20;
----------------
Nit: this is called "LangOpts" in 157/159 checks, please rename for consistency.
================
Comment at:
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst:20
+This check implements
+`CppCoreGuideline CP.53
<http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines>`_.
----------------
Add full link to this particular rule:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rcoro-reference-parameters
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140793/new/
https://reviews.llvm.org/D140793
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits