[PATCH] D142423: [clang-tidy] Fix segfault in bugprone-standalone-empty

Denis Nikitin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 17:10:35 PST 2023


denik created this revision.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
denik requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

The check incorrectly identified empty() method call in the template
class definition as a stand-alone function call.
This led to a crash because the checker did not expect empty() function
calls without arguments.

Fixes: https://github.com/llvm/llvm-project/issues/59487


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142423

Files:
  clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp
  clang-tools-extra/docs/clang-tidy/checks/bugprone/standalone-empty.rst
  clang-tools-extra/test/clang-tidy/checkers/bugprone/standalone-empty.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142423.491567.patch
Type: text/x-patch
Size: 3817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230124/8e53909d/attachment-0001.bin>


More information about the cfe-commits mailing list