[PATCH] D137263: add boundary check for ASTUnresolvedSet::erase

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 16:03:33 PDT 2022


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

Good catch!  Easy to see how this escaped notice for a decade, but still, it'll be good to fix.

LGTM with a minor improvement.



================
Comment at: clang/include/clang/AST/ASTUnresolvedSet.h:74
+    if (I == (Decls.size() - 1))
+      Decls.pop_back_val();
+    else
----------------
This can just be `pop_back()`.


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

https://reviews.llvm.org/D137263



More information about the cfe-commits mailing list