From: Dmitri Gribenko Date: Fri, 23 Aug 2013 17:45:43 +0000 (+0000) Subject: Use CharInfo.h routines in TextComment::isWhitespaceNoCache X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db6adaba6835fbd14e5ff7d6ebfc906c497935a0;p=platform%2Fupstream%2Fllvm.git Use CharInfo.h routines in TextComment::isWhitespaceNoCache llvm-svn: 189115 --- diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp index a16a023..79cabdb 100644 --- a/clang/lib/AST/Comment.cpp +++ b/clang/lib/AST/Comment.cpp @@ -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;