[all-commits] [llvm/llvm-project] a1b1c2: [clang] ASTMatchers: Fix out-of-bounds access in f...

Felix Berger via All-commits all-commits at lists.llvm.org
Wed Dec 15 09:36:44 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1b1c23a3b5f2cbe38e90140227bb38a7783e574
      https://github.com/llvm/llvm-project/commit/a1b1c23a3b5f2cbe38e90140227bb38a7783e574
  Author: Felix Berger <flx at google.com>
  Date:   2021-12-15 (Wed, 15 Dec 2021)

  Changed paths:
    M clang/include/clang/ASTMatchers/ASTMatchers.h
    M clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp

  Log Message:
  -----------
  [clang] ASTMatchers: Fix out-of-bounds access in foreachArgumentWithParamType.

The matcher crashes when a variadic function pointer is invoked because the
FunctionProtoType has fewer parameters than arguments.

Matching of non-variadic arguments now works.

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

Reviewed-by: sammccall




More information about the All-commits mailing list