[PATCH] D128294: [ADT] [lld-macho] Check for end iterator deref in filter_iterator_base
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 12:02:56 PDT 2022
int3 accepted this revision.
int3 added a comment.
much shorter test case, nice :)
================
Comment at: lld/test/MachO/dwarf-no-compile-unit.s:5
+# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
+# RUN: %lld -arch arm64 -o %t.dylib %t.o
+
----------------
could just be `-o /dev/null`
================
Comment at: llvm/include/llvm/ADT/STLExtras.h:447-456
+
+ decltype(auto) operator*() const {
+ assert(BaseT::wrapped() != End && "Cannot dereference end iterator!");
+ return BaseT::operator*();
+ }
+
+ decltype(auto) operator->() const {
----------------
thakis wrote:
> int3 wrote:
> > int3 wrote:
> > > this seems like it should be a separate commit
> > (but if thakis thinks it's fine then I guess it is)
> (bertaland suggested making it a separate commit originally, but I thought it'd be nice to have assert and fix in one change (?))
ah gotcha
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128294/new/
https://reviews.llvm.org/D128294
More information about the llvm-commits
mailing list