[all-commits] [llvm/llvm-project] 152523: [analyzer] StdLibraryFunctionsChecker: fix bug wit...

Gabor Marton via All-commits all-commits at lists.llvm.org
Thu Apr 2 08:00:27 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1525232e276153e325a49372894ae52ed07351a5
      https://github.com/llvm/llvm-project/commit/1525232e276153e325a49372894ae52ed07351a5
  Author: Gabor Marton <gabor.marton at ericsson.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
    M clang/test/Analysis/std-c-library-functions-arg-constraints.c

  Log Message:
  -----------
  [analyzer] StdLibraryFunctionsChecker: fix bug with arg constraints

Summary:
Previously we induced a state split if there were multiple argument
constraints given for a function. This was because we called
`addTransition` inside the for loop.
The fix is to is to store the state and apply the next argument
constraint on that. And once the loop is finished we call `addTransition`.

Reviewers: NoQ, Szelethus, baloghadamsoftware

Subscribers: whisperity, xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, C

Tags: #clang

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




More information about the All-commits mailing list