[all-commits] [llvm/llvm-project] 8363b0: [clang-tidy] add AllowedTypes option to misc-const...
Baranov Victor via All-commits
all-commits at lists.llvm.org
Wed Feb 19 13:47:38 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8363b0a6bab041b54316962e3e8948098148baeb
https://github.com/llvm/llvm-project/commit/8363b0a6bab041b54316962e3e8948098148baeb
Author: Baranov Victor <70346889+vbvictor at users.noreply.github.com>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
M clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
M clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/checks/misc/const-correctness.rst
A clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-allowed-types.cpp
Log Message:
-----------
[clang-tidy] add AllowedTypes option to misc-const-correctness (#122951)
Add option `AllowedTypes` which allow users to specify types they want
to exclude from const-correctness check.
Small real-world example:
```cpp
#include <mutex>
int main() {
std::mutex m;
std::lock_guard<std::mutex> l(m); // we want to ignore it since std::lock_guard is already immutable.
}
```
Closes issue https://github.com/llvm/llvm-project/issues/122592
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list