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

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


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: e89602b7b2ec12f20f2618cefb864c2b22d0048a
      https://github.com/llvm/llvm-project/commit/e89602b7b2ec12f20f2618cefb864c2b22d0048a
  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

(Cherry-picked from commit 416e689ecda66616da855c82f7ec652657730c6a)




More information about the All-commits mailing list