================
@@ -235,6 +242,19 @@ void testStrlenCallee(void) {
clang_analyzer_eval(lenBefore == lenAfter); // expected-warning{{UNKNOWN}}
}
+void strlen_symbolic_offset(unsigned x) {
+ const char *str = "abcd";
+ if (x > 3)
+ return;
+ // FIXME: these should be known
----------------
NagyDonat wrote:
You can use `clang_analyzer_value` to directly investigate the range (set)
deduced for the symbol. It can be used e.g. as
```
clang_analyzer_value(x); // expected-warning {{32s:{ [-2147483648, 41], [43,
86], [88, 2147483647] }}}
```
https://github.com/llvm/llvm-project/pull/159795
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits