upsj accepted this revision.
upsj added a comment.
This revision is now accepted and ready to land.

Not sure I qualify as a suitable reviewer, but this looks really good to me, 
save for maybe a small safety measure :)



================
Comment at: clang-tools-extra/clangd/AST.cpp:833-837
+        auto ParamEnd = It + Parameters.size() - 1;
+        assert(std::distance(Args.begin(), ParamEnd) <
+                   std::distance(Args.begin(), Args.end()) &&
+               "Only functions with greater than or equal number of parameters 
"
+               "should be checked.");
----------------
I think it would be safer to check this explicitly, since advancing the 
iterator past its end might be UB (depending on the implementation).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130260

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

Reply via email to