[clang] [analyzer] Fix crash when modelling 'getline' function in checkers (PR #145229)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 00:26:08 PDT 2025


================
@@ -0,0 +1,127 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_CORRECT
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_GETLINE_1
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_GETLINE_2
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_GETLINE_3
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_GETLINE_4
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_GETLINE_5
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s -DTEST_GETLINE_GH144884
----------------
necto wrote:

This is perhaps subjective, but I find it very awkward to have a single test file that is effectively just a concatenation of 7 independent test files. What made you choose to have one file instead of 7 files?
(if you are worried about high file-count in the "test/Analysis" directory, you could put these files into a subdirectory, for example)

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


More information about the cfe-commits mailing list