[PATCH] D146921: [clang-tidy] Implement cppcoreguidelines F.19
Chris Cotter via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 26 14:20:37 PDT 2023
ccotter added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ForwardingReferenceParamNotForwardedCheck.cpp:83-84
+
+ if (!Param)
+ return;
+
----------------
PiotrZSL wrote:
> I thing this can never happen
Another review suggested I check the matched node for nullness, even though it was the only possible match (https://reviews.llvm.org/D140793). I'll keep it as is since in the spirit of defensive programming and to assist future developers who may add more matches that might invalidate the invariant that `Param` is always non-null.
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ForwardingReferenceParamNotForwardedCheck.h:32
+ }
+};
+
----------------
PiotrZSL wrote:
> add here that thing about UnlessSpelledInSource....
Sorry, I think I'm missing some context here. Would you mind clarifying your comment?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146921/new/
https://reviews.llvm.org/D146921
More information about the cfe-commits
mailing list