[PATCH] D157246: [clang-tidy] Update tests to include C++23 and C++26
Adrian Vogelsgesang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 6 17:31:36 PDT 2023
avogelsgesang created this revision.
Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun.
Herald added a project: All.
avogelsgesang requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.
This commit changes the `c++xx-or-later` definitions to also include
C++23 and the upcoming C++26.
`readability/container-contains.cpp` to also test newer C++ versions.
Also, this commit adjusts a couple of test cases slightly:
- `container-contains.cpp` now also tests newer C++ versions. Restricting it to C++20 was an oversight of mine when originally writing this check.
- `unconventional-assign-operator.cpp`: The `return rhs` raised a "non-const lvalue reference to type 'BadReturnStatement' cannot bind to a temporary" error in C++23. The issue is circumenvented by writing `return *&rhs`.
- `const-correctness-values.cpp` was also running into the same error in C++23. The troublesome test cases were moved to a separate file.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157246
Files:
clang-tools-extra/test/clang-tidy/check_clang_tidy.py
clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values-before-cxx23.cpp
clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp
clang-tools-extra/test/clang-tidy/checkers/misc/unconventional-assign-operator.cpp
clang-tools-extra/test/clang-tidy/checkers/readability/container-contains.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157246.547617.patch
Type: text/x-patch
Size: 4939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230807/adb2e58a/attachment-0001.bin>
More information about the cfe-commits
mailing list