[all-commits] [llvm/llvm-project] a7cb95: [Analyzer][StdLibraryFunctionsChecker] Describe ar...

Gabor Marton via All-commits all-commits at lists.llvm.org
Fri Apr 23 08:28:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a7cb951fa40df14d98c51059194ae42855b96a08
      https://github.com/llvm/llvm-project/commit/a7cb951fa40df14d98c51059194ae42855b96a08
  Author: Gabor Marton <gabor.marton at ericsson.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

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

  Log Message:
  -----------
  [Analyzer][StdLibraryFunctionsChecker] Describe arg constraints

In this patch, I provide a detailed explanation for each argument
constraint. This explanation is added in an extra 'note' tag, which is
displayed alongside the warning.
Since these new notes describe clearly the constraint, there is no need
to provide the number of the argument (e.g. 'Arg3') within the warning.
However, I decided to keep the name of the constraint in the warning (but
this could be a subject of discussion) in order to be able to identify
the different kind of constraint violations easily in a bug database
(e.g. CodeChecker).

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




More information about the All-commits mailing list