mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 12:36:06 +00:00
Use CharInfo.h routines in TextComment::isWhitespaceNoCache
llvm-svn: 189115
This commit is contained in:
parent
fc88dbd298
commit
db6adaba68
@ -12,6 +12,7 @@
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/DeclTemplate.h"
|
||||
#include "clang/Basic/CharInfo.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
@ -94,9 +95,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) {
|
||||
const char C = *I;
|
||||
if (C != ' ' && C != '\n' && C != '\r' &&
|
||||
C != '\t' && C != '\f' && C != '\v')
|
||||
if (!clang::isWhitespace(*I))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user