forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] Added support for 3-argument std::string ctor in bugpron…
…e-string-constructor check (llvm#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 llvm#123198.
- Loading branch information
Showing
4 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters