diff --git a/clang/test/Analysis/Inputs/system-header-simulator-cxx.h b/clang/test/Analysis/Inputs/system-header-simulator-cxx.h --- a/clang/test/Analysis/Inputs/system-header-simulator-cxx.h +++ b/clang/test/Analysis/Inputs/system-header-simulator-cxx.h @@ -60,6 +60,11 @@ __vector_iterator operator+(difference_type n) { return ptr + n; } + friend __vector_iterator operator+( + difference_type n, + const __vector_iterator &iter) { + return n + iter.ptr; + } __vector_iterator operator-(difference_type n) { return ptr - n; } @@ -118,6 +123,11 @@ __deque_iterator operator+(difference_type n) { return ptr + n; } + friend __deque_iterator operator+( + difference_type n, + const __deque_iterator &iter) { + return n + iter.ptr; + } __deque_iterator operator-(difference_type n) { return ptr - n; } diff --git a/clang/test/Analysis/diagnostics/explicit-suppression.cpp b/clang/test/Analysis/diagnostics/explicit-suppression.cpp --- a/clang/test/Analysis/diagnostics/explicit-suppression.cpp +++ b/clang/test/Analysis/diagnostics/explicit-suppression.cpp @@ -19,6 +19,6 @@ void testCopyNull(C *I, C *E) { std::copy(I, E, (C *)0); #ifndef SUPPRESSED - // expected-warning@../Inputs/system-header-simulator-cxx.h:699 {{Called C++ object pointer is null}} + // expected-warning@../Inputs/system-header-simulator-cxx.h:709 {{Called C++ object pointer is null}} #endif }