[clang] [analyzer] Fix crash when modelling 'getline' function in checkers (PR #145229)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 01:27:25 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
----------------
vbvictor wrote:
TBH, in clang-tidy, where I make most contributions, we tend to have one file with multiple RUN commands, so I naturally went with this approach. For me, It's easier to navigate one 100-line file with multiple commands than 5 20-line files. Also, these tests logically belong to one test suite, so placing in one file keep tests organized.
https://github.com/llvm/llvm-project/pull/145229
More information about the cfe-commits
mailing list