[all-commits] [llvm/llvm-project] 163863: [analyzer] Evaluate PredefinedExpressions

Balazs Benics via All-commits all-commits at lists.llvm.org
Sun Sep 13 23:44:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 163863604f9c1ad3add238f9e8fb32cfd136f894
      https://github.com/llvm/llvm-project/commit/163863604f9c1ad3add238f9e8fb32cfd136f894
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/Environment.cpp
    M clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
    A clang/test/Analysis/eval-predefined-exprs.cpp

  Log Message:
  -----------
  [analyzer] Evaluate PredefinedExpressions

We did not evaluate such expressions, just returned `Unknown` for such cases.
After this patch, we will be able to access a unique value identifying a template instantiation via the value of the `PRETTY_FUNCTION` predefined expression.

Reviewed By: vsavchenko

Differential Revision: https://reviews.llvm.org/D87004


  Commit: d7ae9696e31f6484de4ff4c10bca144d7e61320c
      https://github.com/llvm/llvm-project/commit/d7ae9696e31f6484de4ff4c10bca144d7e61320c
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M llvm/docs/Lexicon.rst

  Log Message:
  -----------
  [analyzer][docs][NFC] Document the ento namespace in the llvm/Lexicon

Document the `ento` namespace in the Lexicon according to @nicolas17 on the
mailing list (http://lists.llvm.org/pipermail/cfe-dev/2020-August/066577.html).

The analyzer lived at different namespaces at different times.
Originally lived at the `GR` aka. (Graph Reachability)  namespace [7], later it
moved under the `ento` namespace [9].

The Static Analyzer's code lived at many other places as well:
`Analysis` -[2]-> `Checker` -[5]-> `GR` -[10]> `entoSA` -[11]-> `StaticAnalyzer`

The relevant code motion, refactor commits, cfe-dev mailing in chronological
order:
 1) 2008-03-15 Make a major restructuring of the clang tree: introduce a ...
    7a51313d8a0a358bb92eb5dbf8fd846b7c48e7fe
 2) 2010-01-25 Split libAnalysis into two libraries: libAnalysis and libChecker
    d6b8708643219776b1f0f41df32c5eccf065ed5b
 3) 2010-12-21 Reorganization of Checker files
    http://lists.llvm.org/pipermail/cfe-dev/2010-December/012694.html
 4) 2010-12-22 Refactoring: include/clang/Checker -> include/clang/GR
    8d602a8aa8e6697509465d8a5473fc41cb1a382e
 5) 2010-12-22 Refactoring: lib/Checker -> lib/GR
    2ff5ab1516e48c2fff0138f953d887b5e695214b
 6) 2010-12-22 Refactoring: Move checkers into lib/GR/Checkers and their own
    a700e976b658860418bc145ec0bdacd4f1db3264
 7) 2010-12-22 Refactoring: Move stuff into namespace 'GR'
    ca08fba4141f1d3ae6193b3c81fb6ba8fb10d7dc
 8) 2010-12-22 Refactoring: Drop the 'GR' prefix.
    1696f508e2fe95793ca8bb70d78b88023b6b8625
 9) 2010-12-23 Rename static analyzer namespace 'GR' to 'ento'
    98857c986078c6e6a10910628dbabf75ae735b76
10) 2010-12-23 Rename headers: 'clang/GR' 'clang/EntoSA' and update Makefile
    ef33f0996c6a625767690395f3cfb41afb84db5a
11) 2010-12-23 Chris Lattner has strong opinions about directory
    d99bd55a5e092774214ba31fc5a871bfc31e711c
12) 2010-12-24 Remove the EntoSA directories.
    9d6af5328e3a61641a125b17125952fa1a6bf11d

Reviewed By: Szelethus,martong,ASDenysPetrov,xazax.hun

Differential Revision: https://reviews.llvm.org/D86446


  Commit: cdacffe4acc083dfb1cccb6458420eed09f9d093
      https://github.com/llvm/llvm-project/commit/cdacffe4acc083dfb1cccb6458420eed09f9d093
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
    M clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
    A clang/test/Analysis/z3/pretty-dump.c

  Log Message:
  -----------
  [analyzer][z3] Use more elaborate Z3 variable names

Previously, it was a tedious task to comprehend Z3 dumps.
We will use the same name prefix just as we use in the corresponding dump method

For all `SymbolData` values:
    `$###` -> `conj_$###`
    `$###` -> `derived_$###`
    `$###` -> `extent_$###`
    `$###` -> `meta_$###`
    `$###` -> `reg_$###`

Reviewed By: xazax.hun,mikhail.ramalho

Differential Revision: https://reviews.llvm.org/D86223


Compare: https://github.com/llvm/llvm-project/compare/4d7b19454397...cdacffe4acc0


More information about the All-commits mailing list