[all-commits] [llvm/llvm-project] 8ac84a: [clang-tidy] readability-container-contains litera...

Thomas Schenker via All-commits all-commits at lists.llvm.org
Mon Dec 4 08:30:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ac84a9555bc25ed9a53ea6a5a09432e18ee9042
      https://github.com/llvm/llvm-project/commit/8ac84a9555bc25ed9a53ea6a5a09432e18ee9042
  Author: Thomas Schenker <thomas.schenker at protonmail.com>
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp

  Log Message:
  -----------
  [clang-tidy] readability-container-contains literal suffixes (#74215)

Before this PR, readability-container-contains fix-its did not handle
integer literal suffixes correctly. It e.g. changed
```
  MyMap.count(2) != 0U;
```
into
```
  MyMap.contains(2)U;
```

With this PR, it correctly changes it to
```
  MyMap.contains(2);
```




More information about the All-commits mailing list