[all-commits] [llvm/llvm-project] eeff1a: [analyzer][CallAndMessage][NFC] Split up checkPreCall

Kristóf Umann via All-commits all-commits at lists.llvm.org
Thu May 21 03:55:27 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eeff1a970a6bb09d3c046313e229e2871929cd63
      https://github.com/llvm/llvm-project/commit/eeff1a970a6bb09d3c046313e229e2871929cd63
  Author: Kirstóf Umann <dkszelethus at gmail.com>
  Date:   2020-05-21 (Thu, 21 May 2020)

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

  Log Message:
  -----------
  [analyzer][CallAndMessage][NFC] Split up checkPreCall

The patch aims to use CallEvents interface in a more principled manner, and also
to highlight what this checker really does. It in fact checks for 5 different
kinds of errors (from checkPreCall, that is):

 * Invalid function pointer related errors
 * Call of methods from an invalid C++ this object
 * Function calls with incorrect amount of parameters
 * Invalid arguments for operator delete
 * Pass of uninitialized values to pass-by-value parameters

In a previous patch I complained that this checker is responsible for emitting
a lot of different diagnostics all under core.CallAndMessage's name, and this
patch shows where we could start to assign different diagnostics to different
entities.

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




More information about the All-commits mailing list