[cfe-commits] r139115 - /cfe/trunk/lib/Lex/Lexer.cpp

Benjamin Kramer benny.kra at googlemail.com
Mon Sep 5 00:19:35 PDT 2011


Author: d0k
Date: Mon Sep  5 02:19:35 2011
New Revision: 139115

URL: http://llvm.org/viewvc/llvm-project?rev=139115&view=rev
Log:
Use the Lexer's definition of whitespace here.

Modified:
    cfe/trunk/lib/Lex/Lexer.cpp

Modified: cfe/trunk/lib/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=139115&r1=139114&r2=139115&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Mon Sep  5 02:19:35 2011
@@ -32,7 +32,6 @@
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include <cctype>
 #include <cstring>
 using namespace clang;
 
@@ -1677,9 +1676,9 @@
         if (OldPtr[0] == '\n' || OldPtr[0] == '\r') {
           // Okay, we found a // comment that ends in a newline, if the next
           // line is also a // comment, but has spaces, don't emit a diagnostic.
-          if (isspace(C)) {
+          if (isWhitespace(C)) {
             const char *ForwardPtr = CurPtr;
-            while (isspace(*ForwardPtr))  // Skip whitespace.
+            while (isWhitespace(*ForwardPtr))  // Skip whitespace.
               ++ForwardPtr;
             if (ForwardPtr[0] == '/' && ForwardPtr[1] == '/')
               break;





More information about the cfe-commits mailing list