Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

The "if" statement being removed in this patch is identical to the
"else" clause.

The "if" statement being removed in this patch is identical to the
"else" clause.
@llvmbot
Copy link
Member

llvmbot commented Oct 26, 2025

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

Changes

The "if" statement being removed in this patch is identical to the
"else" clause.


Full diff: https://github.com/llvm/llvm-project/pull/165134.diff

1 Files Affected:

  • (modified) llvm/lib/Support/LSP/Protocol.cpp (-4)
diff --git a/llvm/lib/Support/LSP/Protocol.cpp b/llvm/lib/Support/LSP/Protocol.cpp
index f22126345a435..f8eeb32db02ab 100644
--- a/llvm/lib/Support/LSP/Protocol.cpp
+++ b/llvm/lib/Support/LSP/Protocol.cpp
@@ -96,10 +96,6 @@ static void percentEncode(StringRef Content, std::string &Out) {
 static std::string percentDecode(StringRef Content) {
   std::string Result;
   for (auto I = Content.begin(), E = Content.end(); I != E; ++I) {
-    if (*I != '%') {
-      Result += *I;
-      continue;
-    }
     if (*I == '%' && I + 2 < Content.end() && llvm::isHexDigit(*(I + 1)) &&
         llvm::isHexDigit(*(I + 2))) {
       Result.push_back(llvm::hexFromNibbles(*(I + 1), *(I + 2)));

@kazutakahirata kazutakahirata merged commit b153e01 into llvm:main Oct 26, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251025_Support_LSP_control_flow branch October 26, 2025 15:20
varun-r-mallya pushed a commit to varun-r-mallya/llvm-project that referenced this pull request Oct 27, 2025
The "if" statement being removed in this patch is identical to the
"else" clause.
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
The "if" statement being removed in this patch is identical to the
"else" clause.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
The "if" statement being removed in this patch is identical to the
"else" clause.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
The "if" statement being removed in this patch is identical to the
"else" clause.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants