[clang-tools-extra] r342964 - [clangd] Fix build bot after r342961
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 25 04:47:14 PDT 2018
Author: ioeric
Date: Tue Sep 25 04:47:14 2018
New Revision: 342964
URL: http://llvm.org/viewvc/llvm-project?rev=342964&view=rev
Log:
[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
Modified:
clang-tools-extra/trunk/clangd/URI.cpp
Modified: clang-tools-extra/trunk/clangd/URI.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/URI.cpp?rev=342964&r1=342963&r2=342964&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/URI.cpp (original)
+++ clang-tools-extra/trunk/clangd/URI.cpp Tue Sep 25 04:47:14 2018
@@ -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::StringRe
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 == '-';
});
}
More information about the cfe-commits
mailing list