[PATCH] D138357: [clang-format][NFC] Don't add a load of 0es

2022-11-21 Thread Björn Schäpers via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9e00909b00f9: [clang-format][NFC] Dont add a load of 
0es (authored by HazardyKnusperkeks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138357/new/

https://reviews.llvm.org/D138357

Files:
  clang/lib/Format/WhitespaceManager.cpp


Index: clang/lib/Format/WhitespaceManager.cpp
===
--- clang/lib/Format/WhitespaceManager.cpp
+++ clang/lib/Format/WhitespaceManager.cpp
@@ -1049,7 +1049,7 @@
   Changes[i].StartOfBlockComment->StartOfTokenColumn -
   Changes[i].StartOfTokenColumn;
 }
-if (Shift < 0)
+if (Shift <= 0)
   continue;
 Changes[i].Spaces += Shift;
 if (i + 1 != Changes.size())


Index: clang/lib/Format/WhitespaceManager.cpp
===
--- clang/lib/Format/WhitespaceManager.cpp
+++ clang/lib/Format/WhitespaceManager.cpp
@@ -1049,7 +1049,7 @@
   Changes[i].StartOfBlockComment->StartOfTokenColumn -
   Changes[i].StartOfTokenColumn;
 }
-if (Shift < 0)
+if (Shift <= 0)
   continue;
 Changes[i].Spaces += Shift;
 if (i + 1 != Changes.size())
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D138357: [clang-format][NFC] Don't add a load of 0es

2022-11-19 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision.
HazardyKnusperkeks added reviewers: rymiel, owenpan, MyDeveloperDay.
HazardyKnusperkeks added a project: clang-format.
Herald added a project: All.
HazardyKnusperkeks requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Shift is 0 for all non comments, maybe even for comments. Don't add the 0 up to 
three times.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138357

Files:
  clang/lib/Format/WhitespaceManager.cpp


Index: clang/lib/Format/WhitespaceManager.cpp
===
--- clang/lib/Format/WhitespaceManager.cpp
+++ clang/lib/Format/WhitespaceManager.cpp
@@ -1049,7 +1049,7 @@
   Changes[i].StartOfBlockComment->StartOfTokenColumn -
   Changes[i].StartOfTokenColumn;
 }
-if (Shift < 0)
+if (Shift <= 0)
   continue;
 Changes[i].Spaces += Shift;
 if (i + 1 != Changes.size())


Index: clang/lib/Format/WhitespaceManager.cpp
===
--- clang/lib/Format/WhitespaceManager.cpp
+++ clang/lib/Format/WhitespaceManager.cpp
@@ -1049,7 +1049,7 @@
   Changes[i].StartOfBlockComment->StartOfTokenColumn -
   Changes[i].StartOfTokenColumn;
 }
-if (Shift < 0)
+if (Shift <= 0)
   continue;
 Changes[i].Spaces += Shift;
 if (i + 1 != Changes.size())
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits