[clangd] Fix build bot after r342961

Use llvm::isAlpha instead of std::isalpha etc. This should fix bot failure:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20180

llvm-svn: 342964
This commit is contained in:
Eric Liu 2018-09-25 11:47:14 +00:00
parent cb4cd5ccdc
commit a9d41f94b9
1 changed files with 3 additions and 4 deletions

View File

@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "URI.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Format.h"
@ -15,7 +16,6 @@
#include "llvm/Support/Path.h"
#include <algorithm>
#include <iomanip>
#include <locale>
#include <sstream>
LLVM_INSTANTIATE_REGISTRY(clang::clangd::URISchemeRegistry)
@ -134,11 +134,10 @@ std::string percentDecode(llvm::StringRef Content) {
bool isValidScheme(llvm::StringRef Scheme) {
if (Scheme.empty())
return false;
if (!std::isalpha(Scheme[0]))
if (!llvm::isAlpha(Scheme[0]))
return false;
return std::all_of(Scheme.begin() + 1, Scheme.end(), [](char C) {
return std::isalpha(C) || std::isdigit(C) || C == '+' || C == '.' ||
C == '-';
return llvm::isAlnum(C) || C == '+' || C == '.' || C == '-';
});
}