[all-commits] [llvm/llvm-project] 58bad2: [analyzer][NFC] Require explicit matching mode for...

Donát Nagy via All-commits all-commits at lists.llvm.org
Fri May 17 04:09:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58bad2862cf136f9483eb005bbfa6915d459b46d
      https://github.com/llvm/llvm-project/commit/58bad2862cf136f9483eb005bbfa6915d459b46d
  Author: Donát Nagy <donat.nagy at ericsson.com>
  Date:   2024-05-17 (Fri, 17 May 2024)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h
    M clang/lib/StaticAnalyzer/Core/CallDescription.cpp
    M clang/unittests/StaticAnalyzer/BugReportInterestingnessTest.cpp
    M clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp
    M clang/unittests/StaticAnalyzer/ConflictingEvalCallsTest.cpp
    M clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp
    M clang/unittests/StaticAnalyzer/MemRegionDescriptiveNameTest.cpp
    M clang/unittests/StaticAnalyzer/NoStateChangeFuncVisitorTest.cpp

  Log Message:
  -----------
  [analyzer][NFC] Require explicit matching mode for CallDescriptions (#92454)

This commit deletes the "simple" constructor of `CallDescription` which
did not require a `CallDescription::Mode` argument and always used the
"wildcard" mode `CDM::Unspecified`.

A few months ago, this vague matching mode was used by many checkers,
which caused bugs like https://github.com/llvm/llvm-project/issues/81597
and https://github.com/llvm/llvm-project/issues/88181. Since then, my
commits improved the available matching modes and ensured that all
checkers explicitly specify the right matching mode.

After those commits, the only remaining references to the "simple"
constructor were some unit tests; this commit updates them to use an
explicitly specified matching mode (often `CDM::SimpleFunc`).

The mode `CDM::Unspecified` was not deleted in this commit because it's
still a reasonable choice in `GenericTaintChecker` and a few unit tests.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list