[clang-tidy] Fix typo in bugprone-string-constructor.

s/bigger then/bigger than/

llvm-svn: 363053
This commit is contained in:
Clement Courbet 2019-06-11 12:12:06 +00:00
parent 1f6c602704
commit f63feaf3c2
2 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ void StringConstructorCheck::check(const MatchFinder::MatchResult &Result) {
const auto *Str = Result.Nodes.getNodeAs<StringLiteral>("str");
const auto *Lit = Result.Nodes.getNodeAs<IntegerLiteral>("int");
if (Lit->getValue().ugt(Str->getLength())) {
diag(Loc, "length is bigger then string literal size");
diag(Loc, "length is bigger than string literal size");
}
} else if (const auto *Ptr = Result.Nodes.getNodeAs<Expr>("from-ptr")) {
Expr::EvalResult ConstPtr;

View File

@ -39,11 +39,11 @@ void Test() {
std::string q1(kText, -4);
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: negative value used as length parameter
std::string q2("test", 200);
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger then string literal size
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
std::string q3(kText, 200);
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger then string literal size
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
std::string q4(kText2, 200);
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger then string literal size
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
std::string q5(kText3, 0x1000000);
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: suspicious large length parameter
std::string q6(nullptr);