[all-commits] [llvm/llvm-project] 6fa096: [analyzer] Use explicit call description mode in M...

Donát Nagy via All-commits all-commits at lists.llvm.org
Wed May 8 03:38:54 PDT 2024


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

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp

  Log Message:
  -----------
  [analyzer] Use explicit call description mode in MIGChecker (#91331)

This commit explicitly specifies the matching mode (C library function,
any non-method function, or C++ method) for the `CallDescription`s
constructed in the checker `osx.MIG`.

The code was simplified to use a `CallDescriptionMap` instead of a raw
vector of pairs.

This change won't cause major functional changes, but isn't NFC because
it ensures that e.g. call descriptions for a non-method function won't
accidentally match a method that has the same name.

Separate commits have already performed this change in other checkers:
- easy cases: e2f1cbae45f81f3cd9a4d3c2bcf69a094eb060fa,
    6d64f8e1feee014e72730a78b62d9d415df112ff
- MallocChecker: d6d84b5d1448e4f2e24b467a0abcf42fe9d543e9
- iterator checkers: 06eedffe0d2782922e63cc25cb927f4acdaf7b30
- InvalidPtr checker: 024281d4d26344f9613b9115ea1fcbdbdba23235
- apiModeling.llvm.ReturnValue: 97dd8e3c4f38ef345b01fbbf0a2052c7875ff7e0

... and follow-up commits will handle the remaining few checkers.

My goal is to ensure that the call description mode is always explicitly
specified and eliminate (or strongly restrict) the vague "may be either
a method or a simple function" mode that's the current default.



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