[clang] [clang-format] remove redundant else statement (PR #94548)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 5 17:22:11 PDT 2024
https://github.com/khufu1 created https://github.com/llvm/llvm-project/pull/94548
None
>From bb9a264b2cb4f0063abd51a15be75c6f0ca4ae08 Mon Sep 17 00:00:00 2001
From: Nour <nourr313 at proton.me>
Date: Thu, 6 Jun 2024 03:15:04 +0300
Subject: [PATCH] remove redundant else statement
---
clang/tools/clang-format/ClangFormat.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp
index 50dd073c41255..6cba1267f3b0d 100644
--- a/clang/tools/clang-format/ClangFormat.cpp
+++ b/clang/tools/clang-format/ClangFormat.cpp
@@ -509,8 +509,7 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) {
if (OutputXML || DryRun) {
if (DryRun)
return emitReplacementWarnings(Replaces, AssumedFileName, Code);
- else
- outputXML(Replaces, FormatChanges, Status, Cursor, CursorPosition);
+ outputXML(Replaces, FormatChanges, Status, Cursor, CursorPosition);
} else {
IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> InMemoryFileSystem(
new llvm::vfs::InMemoryFileSystem);
More information about the cfe-commits
mailing list