[all-commits] [llvm/llvm-project] 932f0d: [clang-tidy] fix crash due to assumed callee in mi...

Julian Schmidt via All-commits all-commits at lists.llvm.org
Wed May 15 05:52:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 932f0de43a9e334e161a69a50bd6b01cd51e238e
      https://github.com/llvm/llvm-project/commit/932f0de43a9e334e161a69a50bd6b01cd51e238e
  Author: Julian Schmidt <git.julian.schmidt at gmail.com>
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/MinMaxUseInitializerListCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/modernize/min-max-use-initializer-list.cpp

  Log Message:
  -----------
  [clang-tidy] fix crash due to assumed callee in min-max-use-initializer-list (#91992)

Previously, the call to `findArgs` for a `CallExpr` inside of a `min` or
`max` call would call `findArgs` before checking if the argument is a
call to `min` or `max`, which is what `findArgs` is expecting.
The fix moves the name checking before the call to `findArgs`, such that
only a `min` or `max` function call is used as an argument.

Fixes #91982 
Fixes #92249



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