We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2228b4b commit d96579bCopy full SHA for d96579b
clang/include/clang/Lex/DependencyDirectivesScanner.h
@@ -47,11 +47,10 @@ struct Token {
47
48
bool is(tok::TokenKind K) const { return Kind == K; }
49
bool isNot(tok::TokenKind K) const { return Kind != K; }
50
- bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const {
51
- return is(K1) || is(K2);
52
- }
53
- template <typename... Ts> bool isOneOf(tok::TokenKind K1, Ts... Ks) const {
54
- return is(K1) || isOneOf(Ks...);
+ template <typename... Ts> bool isOneOf(Ts... Ks) const {
+ static_assert(sizeof...(Ts) > 0,
+ "requires at least one tok::TokenKind specified");
+ return (is(Ks) || ...);
55
}
56
};
57
0 commit comments