diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2022-01-26 16:55:53 +0100 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2022-01-26 16:55:53 +0100 |
commit | f15014ff549a8686671a599f7b49ce9963769eaf (patch) | |
tree | c71b273ecd3983fba8bfd6777b534c045b120619 /clang/unittests/AST/CommentParser.cpp | |
parent | 297bbf106288b0d673709ca02917d82e7bebdf1a (diff) | |
download | llvm-f15014ff549a8686671a599f7b49ce9963769eaf.zip llvm-f15014ff549a8686671a599f7b49ce9963769eaf.tar.gz llvm-f15014ff549a8686671a599f7b49ce9963769eaf.tar.bz2 |
Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef8206320769ad31422a803a0d6de6077fd231d2.
- It conflicts with the existing llvm::size in STLExtras, which will now
never be called.
- Calling it without llvm:: breaks C++17 compat
Diffstat (limited to 'clang/unittests/AST/CommentParser.cpp')
-rw-r--r-- | clang/unittests/AST/CommentParser.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/clang/unittests/AST/CommentParser.cpp b/clang/unittests/AST/CommentParser.cpp index 0de20dd..62c461a 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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(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 = size(Sources); i != e; i++) { + for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) { FullComment *FC = parseString(Sources[i]); ASSERT_TRUE(HasChildCount(FC, 2)); |