PiotrZSL added inline comments.

================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/forwarding-reference-param-not-forwarded.cpp:138
+
+} // namespace negative_cases
----------------
ccotter wrote:
> ccotter wrote:
> > PiotrZSL wrote:
> > > what about when someone uses std::move instead of std::format ?
> > > maybe some "note" for such issue ?
> > Are you suggesting to have the tool add a special note in something like
> > 
> > ```
> > template <class T>
> > void foo(T&& t) { T other = std::move(t); }
> > ```
> > 
> > I'm not sure I completely followed what you were saying. Or perhaps a fixit 
> > for this specific case of using move on a forwarding reference (fixit to 
> > replace `move` with `forward`).
> @PiotrZSL - I wasn't sure what you meant here.
Yes, I meant that situation. But only because "forwarding reference parameter 
't' is never forwarded inside the function body" could be confused in such 
case, where there is std::move instead of std::forward.
But that could be ignored, or covered by other check that would simply detect 
that you doing move when you should do forward.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146921/new/

https://reviews.llvm.org/D146921

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to