JonasToth added a comment.

From my side only the nits are left.



================
Comment at: clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:94
+  bool VisitDeclRefExpr(DeclRefExpr *S) {
+    const DeclarationName Name = S->getNameInfo().getName();
+    if (!S->getQualifierLoc() && Name.isIdentifier() &&
----------------
Nit: `const` is only used for references or pointers.


================
Comment at: clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:154
+    }
+
+    break;
----------------
Nit: I think this and the next empty line could be ellided. They do not add a 
lot of value and we try to keep the code dense.


================
Comment at: clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:241
+        !ExtendedLeft) {
+      for (int J = static_cast<int>(I) - 1; J >= 0 && IsCV(Tokens[J]); J--)
+        ReturnTypeRange.setBegin(Tokens[J].getLocation());
----------------
integer bug for big `Tokens.size()`. Please add an `assert(I <= 
size_t(std::numeric_limits<int>::max()) && "Integer overflow detected")` or the 
like.
Optimally `gsl::narrow<>()` could be used, which we do not have in LLVM.


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

https://reviews.llvm.org/D56160



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

Reply via email to