[clang-tools-extra] r318778 - [clangd] Fix dumb && || bug from r318774

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 08:44:17 PST 2017


Author: sammccall
Date: Tue Nov 21 08:44:16 2017
New Revision: 318778

URL: http://llvm.org/viewvc/llvm-project?rev=318778&view=rev
Log:
[clangd] Fix dumb && || bug from r318774

Modified:
    clang-tools-extra/trunk/clangd/JSONExpr.cpp

Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONExpr.cpp?rev=318778&r1=318777&r2=318778&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONExpr.cpp (original)
+++ clang-tools-extra/trunk/clangd/JSONExpr.cpp Tue Nov 21 08:44:16 2017
@@ -344,7 +344,7 @@ bool Parser::parseUnicode(std::string &O
     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;




More information about the cfe-commits mailing list