[all-commits] [llvm/llvm-project] 218321: [clang-tidy] Fix crash on "reference-to-array" par...

Whisperity via All-commits all-commits at lists.llvm.org
Wed Jul 28 05:45:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21832121e112d97f1e197b35959867f3a99226ee
      https://github.com/llvm/llvm-project/commit/21832121e112d97f1e197b35959867f3a99226ee
  Author: Whisperity <whisperity at gmail.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-implicits.cpp
    M clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-len2.cpp

  Log Message:
  -----------
  [clang-tidy] Fix crash on "reference-to-array" parameters in 'bugprone-easily-swappable-parameters'

An otherwise unexercised code path related to trying to model
"array-to-pointer decay" resulted in a null pointer dereference crash
when parameters of type "reference to array" were encountered.

Fixes crash report http://bugs.llvm.org/show_bug.cgi?id=50995.

Reviewed By: aaron.ballman

Differential Revision: http://reviews.llvm.org/D106946




More information about the All-commits mailing list