[clang] [clang] [Static analyzer]: add initial support for builtin overflow (PR #102602)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 12:53:52 PDT 2024


================
@@ -0,0 +1,65 @@
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-unknown -verify %s \
+// RUN:   -analyzer-checker=core,debug.ExprInspection
+
+#define NULL ((void *)0)
+#define INT_MAX __INT_MAX__
+
+void clang_analyzer_dump_int(int);
+
+void test1(void)
+{
+   int res;
+
----------------
steakhal wrote:

Could you compactify these tests - eg. by putting the curly to the end of the prev line, and dropping the empty newlines?

I'd also suggest the name `test_concrete_add_concrete` or something like that to deliver the intent of the arguments.

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


More information about the cfe-commits mailing list