Author: gribozavr
Date: Fri Aug 23 12:45:43 2013
New Revision: 189115

URL: http://llvm.org/viewvc/llvm-project?rev=189115&view=rev
Log:
Use CharInfo.h routines in TextComment::isWhitespaceNoCache

Modified:
    cfe/trunk/lib/AST/Comment.cpp

Modified: cfe/trunk/lib/AST/Comment.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Comment.cpp?rev=189115&r1=189114&r2=189115&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Comment.cpp (original)
+++ cfe/trunk/lib/AST/Comment.cpp Fri Aug 23 12:45:43 2013
@@ -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_e
 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;


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to