Files
clang-p2996/clang-tools-extra
Baranov Victor 0b922d66e5 [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (#123413)
This PR add diagnostics for 3-parameter `std::basic_string(const char*
t, size_type pos, size_type count)` constructor in
bugprone-string-constructor check:

```cpp
  std::string r1("test", 1, 0); // constructor creating an empty string
  std::string r2("test", 0, -4); // negative value used as length parameter
  // more examples in test file
  ```

Fixes false-positives reported in https://github.com/llvm/llvm-project/issues/123198.
2025-02-11 09:09:57 +08:00
..
2024-09-19 07:54:06 -04:00

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang forum:
  https://discourse.llvm.org/c/clang

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  https://github.com/llvm/llvm-project/issues/