PiotrZSL added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:39
+              ID) {
+  NotExtendedByDeclBoundToPredicate Predicate;
+  Predicate.ID = ID;
----------------
xgupta wrote:
> Can be written using direct initialization as  
> `NotExtendedByDeclBoundToPredicate Predicate{ID};`
Yes, but I followed like others are done.


================
Comment at: 
clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18
+
+   const std::string& value("hello");
+
----------------
xgupta wrote:
> The below comment is not matching,  do you want to write - 
> `const std::string& str = std::string("hello");`
> ?
actually comment is +- fine, constructor to std::string will be called anyway, 
and for compiler I think those 2 are equal.
Will verify.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146368

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

Reply via email to