Skip to content

Commit 9c432ba

Browse files
committed
add changelog entry
1 parent d974240 commit 9c432ba

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,16 @@ Improvements to Clang's diagnostics
683683
views.push_back(std::string("123")); // warning
684684
}
685685

686+
- Clang now emits a ``-Wtautological-compare`` diagnostic when a check for
687+
pointer additional overflow is always true or false, because overflow would
688+
be undefined behavior.
689+
690+
.. code-block:: c++
691+
692+
bool incorrect_overflow_check(const char *ptr, size_t index) {
693+
return ptr + index < ptr; // warning
694+
}
695+
686696
Improvements to Clang's time-trace
687697
----------------------------------
688698

0 commit comments

Comments
 (0)