From: Peter Collingbourne Date: Sat, 19 Feb 2011 20:06:59 +0000 (+0000) Subject: Reimplement Token::isAnnotation() using TokenKinds.def. No functionality change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c948378154dc37e772e50f95033530d506fa912;p=clang Reimplement Token::isAnnotation() using TokenKinds.def. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126045 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/Token.h b/include/clang/Lex/Token.h index ef4f02cb57..edcfcc10d2 100644 --- a/include/clang/Lex/Token.h +++ b/include/clang/Lex/Token.h @@ -103,9 +103,11 @@ public: } bool isAnnotation() const { - return is(tok::annot_typename) || - is(tok::annot_cxxscope) || - is(tok::annot_template_id); +#define ANNOTATION(NAME) \ + if (is(tok::annot_##NAME)) \ + return true; +#include "clang/Basic/TokenKinds.def" + return false; } /// getLocation - Return a source location identifier for the specified