================
@@ -860,6 +864,21 @@ struct FormatToken {
/*CPlusPlus11=*/true);
}
+ template <typename T> [[nodiscard]] FormatToken *getPrevious(T A1) const {
+ FormatToken *Tok = Previous;
+ while (Tok && !Tok->is(A1))
+ Tok = Tok->Previous;
+ return Tok;
+ }
+
+ template <typename... Ts>
+ [[nodiscard]] FormatToken *getPreviousOneOf(Ts... Ks) const {
+ FormatToken *Tok = Previous;
+ while (Tok && !((Tok->is(Ks) || ...)))
----------------
HazardyKnusperkeks wrote:
```suggestion
while (Tok && (Tok->isNot(Ks) && ...))
```
https://github.com/llvm/llvm-project/pull/191217
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits