[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 10:00:45 PST 2024
================
@@ -15,15 +15,15 @@ void test(const char *d) {
if (NULL == "/")
return;
if ("/" != DELIM) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
- return;
+ return; // cxx-warning at -1 {{comparison between two arrays}}
----------------
erichkeane wrote:
Oooh, thats a great concern! I think you're right, but I think as well that it is ok to do in the followup
https://github.com/llvm/llvm-project/pull/118031
More information about the cfe-commits
mailing list