We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d974240 commit 9c432baCopy full SHA for 9c432ba
clang/docs/ReleaseNotes.rst
@@ -683,6 +683,16 @@ Improvements to Clang's diagnostics
683
views.push_back(std::string("123")); // warning
684
}
685
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
696
Improvements to Clang's time-trace
697
----------------------------------
698
0 commit comments