aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/AST/CommentParser.cpp
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2022-01-26 10:11:12 -0500
committerserge-sans-paille <sguelton@redhat.com>2022-01-26 16:17:45 +0100
commitef8206320769ad31422a803a0d6de6077fd231d2 (patch)
tree06ca6445f38939d6a543e0a64c2ede55497a06cd /clang/unittests/AST/CommentParser.cpp
parent99ae5c13f64e138d6b17c00bd01c87c3ce58cb6b (diff)
downloadllvm-ef8206320769ad31422a803a0d6de6077fd231d2.zip
llvm-ef8206320769ad31422a803a0d6de6077fd231d2.tar.gz
llvm-ef8206320769ad31422a803a0d6de6077fd231d2.tar.bz2
Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to STLForwardCompat.h (which is included by STLExtras.h so no build breakage expected).
Diffstat (limited to 'clang/unittests/AST/CommentParser.cpp')
-rw-r--r--clang/unittests/AST/CommentParser.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/clang/unittests/AST/CommentParser.cpp b/clang/unittests/AST/CommentParser.cpp
index 62c461a..0de20dd 100644
--- a/clang/unittests/AST/CommentParser.cpp
+++ b/clang/unittests/AST/CommentParser.cpp
@@ -664,7 +664,7 @@ TEST_F(CommentParserTest, ParagraphSplitting1) {
"*/"),
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -801,7 +801,7 @@ TEST_F(CommentParserTest, ParamCommand3) {
"// Bbb\n")
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -831,7 +831,7 @@ TEST_F(CommentParserTest, ParamCommand4) {
"// Bbb\n"),
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -861,7 +861,7 @@ TEST_F(CommentParserTest, ParamCommand5) {
"// Bbb\n"),
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -892,7 +892,7 @@ TEST_F(CommentParserTest, ParamCommand6) {
"// Bbb\n"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -947,7 +947,7 @@ TEST_F(CommentParserTest, TParamCommand1) {
"// Bbb\n"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -1081,7 +1081,7 @@ TEST_F(CommentParserTest, HTML1) {
"// <a >"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 1));
@@ -1103,7 +1103,7 @@ TEST_F(CommentParserTest, HTML2) {
"// <br />"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 1));
@@ -1127,7 +1127,7 @@ TEST_F(CommentParserTest, HTML3) {
"// <a href >",
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 1));
@@ -1149,7 +1149,7 @@ TEST_F(CommentParserTest, HTML4) {
"// <a href=\"bbb\">",
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 1));
@@ -1172,7 +1172,7 @@ TEST_F(CommentParserTest, HTML5) {
"// </a >"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 1));
@@ -1285,7 +1285,7 @@ TEST_F(CommentParserTest, VerbatimBlock5) {
" *\\endverbatim*/"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 1));
@@ -1309,7 +1309,7 @@ TEST_F(CommentParserTest, VerbatimBlock6) {
" * \\endverbatim*/"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -1336,7 +1336,7 @@ TEST_F(CommentParserTest, VerbatimBlock7) {
" * \\endverbatim*/"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -1364,7 +1364,7 @@ TEST_F(CommentParserTest, VerbatimBlock8) {
" * Bbb\n"
" * \\endverbatim*/"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -1387,7 +1387,7 @@ TEST_F(CommentParserTest, VerbatimLine1) {
"// \\fn\n"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -1405,7 +1405,7 @@ TEST_F(CommentParserTest, VerbatimLine2) {
"/** \\fn void *foo(const char *zzz = \"\\$\");*/"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));
@@ -1424,7 +1424,7 @@ TEST_F(CommentParserTest, Deprecated) {
"/// @deprecated\n"
};
- for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {
+ for (size_t i = 0, e = size(Sources); i != e; i++) {
FullComment *FC = parseString(Sources[i]);
ASSERT_TRUE(HasChildCount(FC, 2));