[all-commits] [llvm/llvm-project] b198f1: [Analyzer] Model STL Algoirthms to improve the ite...

Balogh, Ádám via All-commits all-commits at lists.llvm.org
Wed Feb 5 08:55:58 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b198f16e1e1c8ee849008c1b886199eae5bc2e01
      https://github.com/llvm/llvm-project/commit/b198f16e1e1c8ee849008c1b886199eae5bc2e01
  Author: Adam Balogh <adam.balogh at ericsson.com>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
    M clang/lib/StaticAnalyzer/Checkers/Iterator.cpp
    M clang/lib/StaticAnalyzer/Checkers/Iterator.h
    M clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
    A clang/lib/StaticAnalyzer/Checkers/STLAlgorithmModeling.cpp
    M clang/test/Analysis/Inputs/system-header-simulator-cxx.h
    M clang/test/Analysis/analyzer-config.c
    A clang/test/Analysis/stl-algorithm-modeling-aggressive-std-find-modeling.cpp
    A clang/test/Analysis/stl-algorithm-modeling.cpp

  Log Message:
  -----------
  [Analyzer] Model STL Algoirthms to improve the iterator checkers

STL Algorithms are usually implemented in a tricky for performance
reasons which is too complicated for the analyzer. Furthermore inlining
them is costly. Instead of inlining we should model their behavior
according to the specifications.

This patch is the first step towards STL Algorithm modeling. It models
all the `find()`-like functions in a simple way: the result is either
found or not. In the future it can be extended to only return success if
container modeling is also extended in a way the it keeps track of
trivial insertions and deletions.

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




More information about the All-commits mailing list