Skip to content

Commit 4c227b1

Browse files
committed
Simplify the original logic even though it's "unrelated"
1 parent a9e2e26 commit 4c227b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/tools/clang-format/ClangFormat.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,11 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) {
509509
Replacements FormatChanges =
510510
reformat(*FormatStyle, *ChangedCode, Ranges, AssumedFileName, &Status);
511511
Replaces = Replaces.merge(FormatChanges);
512-
if (OutputXML || DryRun) {
513-
if (DryRun) {
514-
return Replaces.size() > (IsJson ? 1 : 0) &&
515-
emitReplacementWarnings(Replaces, AssumedFileName, Code);
516-
}
512+
if (DryRun) {
513+
return Replaces.size() > (IsJson ? 1 : 0) &&
514+
emitReplacementWarnings(Replaces, AssumedFileName, Code);
515+
}
516+
if (OutputXML) {
517517
outputXML(Replaces, FormatChanges, Status, Cursor, CursorPosition);
518518
} else {
519519
IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> InMemoryFileSystem(

0 commit comments

Comments
 (0)