[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 3 07:12:21 PDT 2025


================
@@ -0,0 +1,106 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
----------------
flovent wrote:

Added `alpha.unix.cstring` and `unix.cstring` to testcase, `alpha.unix.cstring` makes a difference, in line 66, if `size` is equal to `dest`'s size, `alpha.unix.cstring.OutOfBounds` will be reported, that's before we check `size` or `srcLen`.

https://github.com/llvm/llvm-project/pull/146212


More information about the cfe-commits mailing list