[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 23:48:47 PDT 2022


ASDenysPetrov added a comment.

In D129498#3644222 <https://reviews.llvm.org/D129498#3644222>, @NoQ wrote:

> Looks great!
>
> 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.

> Please add documentation to https://clang.llvm.org/docs/analyzer/developer-docs/DebugChecks.html

I'll do.



================
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
+
----------------
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`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129498/new/

https://reviews.llvm.org/D129498



More information about the cfe-commits mailing list