This revision was automatically updated to reflect the committed changes. Closed by commit rGa8b4b9104c8f: [NFC][clang] Simplify `isOneOf` function (authored by achieveartificialintelligence).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117740/new/ https://reviews.llvm.org/D117740 Files: clang/include/clang/Lex/Token.h Index: clang/include/clang/Lex/Token.h =================================================================== --- clang/include/clang/Lex/Token.h +++ clang/include/clang/Lex/Token.h @@ -99,9 +99,8 @@ bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { return is(K1) || is(K2); } - template <typename... Ts> - bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, Ts... Ks) const { - return is(K1) || isOneOf(K2, Ks...); + template <typename... Ts> bool isOneOf(tok::TokenKind K1, Ts... Ks) const { + return is(K1) || isOneOf(Ks...); } /// Return true if this is a raw identifier (when lexing
Index: clang/include/clang/Lex/Token.h =================================================================== --- clang/include/clang/Lex/Token.h +++ clang/include/clang/Lex/Token.h @@ -99,9 +99,8 @@ bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { return is(K1) || is(K2); } - template <typename... Ts> - bool isOneOf(tok::TokenKind K1, tok::TokenKind K2, Ts... Ks) const { - return is(K1) || isOneOf(K2, Ks...); + template <typename... Ts> bool isOneOf(tok::TokenKind K1, Ts... Ks) const { + return is(K1) || isOneOf(Ks...); } /// Return true if this is a raw identifier (when lexing
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits