From fb796d44f4c61c6cc4210de7bf019dd73a594819 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Tue, 21 Nov 2017 16:44:16 +0000 Subject: [PATCH] [clangd] Fix dumb && || bug from r318774 llvm-svn: 318778 --- clang-tools-extra/clangd/JSONExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/JSONExpr.cpp b/clang-tools-extra/clangd/JSONExpr.cpp index 071fdbf..f28dcff 100644 --- a/clang-tools-extra/clangd/JSONExpr.cpp +++ b/clang-tools-extra/clangd/JSONExpr.cpp @@ -344,7 +344,7 @@ bool Parser::parseUnicode(std::string &Out) { uint16_t Second; if (!Parse4Hex(Second)) return false; - if (Second < 0xDC00 && Second >= 0xE000) { + if (Second < 0xDC00 || Second >= 0xE000) { Invalid(); // Leading surrogate not followed by trailing. First = Second; // Second escape still needs to be processed. continue; -- 2.7.4