[clang] [analyzer] Fix "sprintf" parameter modeling in CStringChecker (PR #74345)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 28 07:08:38 PST 2023
================
@@ -1,13 +1,15 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
-
-// expected-no-diagnostics
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,debug.ExprInspection -verify %s
// Test functions that are called "memcpy" but aren't the memcpy
// we're looking for. Unfortunately, this test cannot be put into
// a namespace. The out-of-class weird memcpy needs to be recognized
// as a normal C function for the test to make sense.
typedef __typeof(sizeof(int)) size_t;
void *memcpy(void *, const void *, size_t);
+int sprintf(char *str, const char *format, ...);
----------------
steakhal wrote:
Added the newline.
https://github.com/llvm/llvm-project/pull/74345
More information about the cfe-commits
mailing list