[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 20:23:14 PDT 2022
NoQ added a comment.
In D129498#3647348 <https://reviews.llvm.org/D129498#3647348>, @ASDenysPetrov wrote:
> In D129498#3644222 <https://reviews.llvm.org/D129498#3644222>, @NoQ wrote:
>
>> Maybe `clang_analyzer_range()` instead?
>
> This was its first name. I refused. First, because it emits concrete integers as well and moreover we can extend it for arrays or strings e.g. Second, the ranges is just an implementation detail and an actual thing we want to see is an associated value.
Ok how about `clang_analyzer_constraint()`? A concrete value could be thought of as constraint, and so can be range, or anything else any exotic constraint managers may decide to dump.
================
Comment at: clang/test/Analysis/print-ranges.cpp:1
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config eagerly-assume=false -verify %s
+
----------------
ASDenysPetrov wrote:
> NoQ wrote:
> > I suspect this test will crash when clang is built with Z3, because the Z3 constraint manager doesn't implement your new function yet.
> Agree. Is it enough `REQUIRES: no-z3` or to add `#ifdef ANALYZER_CM_Z3`?
That should be good. My personal tradition in such cases is to double-check that this doesn't disable the test entirely.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129498/new/
https://reviews.llvm.org/D129498
More information about the cfe-commits
mailing list