================
@@ -97,6 +97,17 @@ void strlen_constant2(char x) {
   clang_analyzer_eval(strlen(a) == 3); // expected-warning{{UNKNOWN}}
 }
 
+const char *const global_str_ptr = "abcd";
----------------
luamfb wrote:

I've added a new test to cover this too. Since non-const pointers can be 
changed to point to strings of different length, I've assumed the correct 
behavior for the comparison is to be UNKNOWN. Please let me know if this is 
wrong.

https://github.com/llvm/llvm-project/pull/68368
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to