From a9d41f94b9a3db4c07ee6d8a950bba1893742c61 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 25 Sep 2018 11:47:14 +0000 Subject: [PATCH] [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 --- clang-tools-extra/clangd/URI.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clangd/URI.cpp b/clang-tools-extra/clangd/URI.cpp index 8c297a3..0eab8f5 100644 --- a/clang-tools-extra/clangd/URI.cpp +++ b/clang-tools-extra/clangd/URI.cpp @@ -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 #include -#include #include 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 == '-'; }); } -- 2.7.4