[all-commits] [llvm/llvm-project] 416e68: [clang-tidy] Fix `readability-suspicious-call-argu...

Whisperity via All-commits all-commits at lists.llvm.org
Fri Feb 25 07:25:51 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 416e689ecda66616da855c82f7ec652657730c6a
      https://github.com/llvm/llvm-project/commit/416e689ecda66616da855c82f7ec652657730c6a
  Author: Whisperity <whisperity at gmail.com>
  Date:   2022-02-25 (Fri, 25 Feb 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability-suspicious-call-argument.cpp

  Log Message:
  -----------
  [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

As originally reported by @steakhal in
http://github.com/llvm/llvm-project/issues/54074, the name extraction logic of
`readability-suspicious-call-argument` crashes if the argument passed to a
function was a function call to a non-trivially named entity (e.g. an operator).

Fixed this crash case by ignoring such constructs and considering them as having
no name.

Reviewed By: aaron.ballman, steakhal

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




More information about the All-commits mailing list