[clang] [analyzer] Model concrete floating-point values (PR #214098)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 25 06:32:42 PDT 2026
================
@@ -0,0 +1,48 @@
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 \
+// RUN: -analyzer-checker=core,debug.ExprInspection \
+// RUN: -analyzer-config eagerly-assume=false -verify %s
+
+void clang_analyzer_dump_float(float);
+void clang_analyzer_dump_double(double);
+void clang_analyzer_eval(int);
+
+template <typename T> T twice(T x) { return x + x; }
+
+struct Vec {
+ float v;
+ Vec operator+(Vec o) const { return Vec{v + o.v}; }
+};
----------------
steakhal wrote:
Why is this called `Vec` - this isn't a vector. What does `Vec` stand for?
https://github.com/llvm/llvm-project/pull/214098
More information about the cfe-commits
mailing list