Issue 122592
Summary [clang-tidy] Add ClassIgnoreList option to misc-const-correctness
Labels clang-tidy
Assignees
Reporter vbvictor
    Sometimes in large codebases we want to ignore const-correctness of certain classes because they are immutable by nature, so there is no point in adding const to them.
Minimal example:

```cpp
#include <mutex>

int main() {
 std::mutex m;
  std::lock_guard<std::mutex> l(m); // check is triggered but we want to ignore it since lock_guard is already immutable.
}
```

Writing NOLINT for thousands of places bloats code and is not an appealing option.


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to