aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/Comment.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-12-11 11:54:36 -0800
committerKazu Hirata <kazu@google.com>2021-12-11 11:54:37 -0800
commitc2bb9637d97029d4c97c256718ed1f771d02c232 (patch)
treedac7feba62a5440c3f3475c3b224bf840b01ac03 /clang/lib/AST/Comment.cpp
parent731676b10dfe684d7f166cb0f85cd6ede1660119 (diff)
downloadllvm-c2bb9637d97029d4c97c256718ed1f771d02c232.zip
llvm-c2bb9637d97029d4c97c256718ed1f771d02c232.tar.gz
llvm-c2bb9637d97029d4c97c256718ed1f771d02c232.tar.bz2
Use llvm::any_of and llvm::all_of (NFC)
Diffstat (limited to 'clang/lib/AST/Comment.cpp')
-rw-r--r--clang/lib/AST/Comment.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp
index fae3640..43820fc 100644
--- a/clang/lib/AST/Comment.cpp
+++ b/clang/lib/AST/Comment.cpp
@@ -108,12 +108,7 @@ Comment::child_iterator Comment::child_end() const {
}
bool TextComment::isWhitespaceNoCache() const {
- for (StringRef::const_iterator I = Text.begin(), E = Text.end();
- I != E; ++I) {
- if (!clang::isWhitespace(*I))
- return false;
- }
- return true;
+ return llvm::all_of(Text, clang::isWhitespace);
}
bool ParagraphComment::isWhitespaceNoCache() const {