]> granicus.if.org Git - clang/commitdiff
Use the Lexer's definition of whitespace here.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 5 Sep 2011 07:19:35 +0000 (07:19 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 5 Sep 2011 07:19:35 +0000 (07:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139115 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Lexer.cpp

index 4de6ce7ad5cf775accaae699e68de180d6bf9e3e..a6353384943d9ce235f068ed348abb7d91cb0b1a 100644 (file)
@@ -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 @@ bool Lexer::SkipBCPLComment(Token &Result, const char *CurPtr) {
         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;