Skip to content

Commit f63feaf

Browse files
committed
[clang-tidy] Fix typo in bugprone-string-constructor.
s/bigger then/bigger than/ llvm-svn: 363053
1 parent 1f6c602 commit f63feaf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void StringConstructorCheck::check(const MatchFinder::MatchResult &Result) {
134134
const auto *Str = Result.Nodes.getNodeAs<StringLiteral>("str");
135135
const auto *Lit = Result.Nodes.getNodeAs<IntegerLiteral>("int");
136136
if (Lit->getValue().ugt(Str->getLength())) {
137-
diag(Loc, "length is bigger then string literal size");
137+
diag(Loc, "length is bigger than string literal size");
138138
}
139139
} else if (const auto *Ptr = Result.Nodes.getNodeAs<Expr>("from-ptr")) {
140140
Expr::EvalResult ConstPtr;

clang-tools-extra/test/clang-tidy/bugprone-string-constructor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ void Test() {
3939
std::string q1(kText, -4);
4040
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: negative value used as length parameter
4141
std::string q2("test", 200);
42-
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger then string literal size
42+
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
4343
std::string q3(kText, 200);
44-
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger then string literal size
44+
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
4545
std::string q4(kText2, 200);
46-
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger then string literal size
46+
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: length is bigger than string literal size
4747
std::string q5(kText3, 0x1000000);
4848
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: suspicious large length parameter
4949
std::string q6(nullptr);

0 commit comments

Comments
 (0)