diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-19 20:06:59 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-19 20:06:59 +0000 |
commit | 6c948378154dc37e772e50f95033530d506fa912 (patch) | |
tree | f3b14a5c5887b73f745391662428d566b7020804 | |
parent | 7f11d9cf5df1f8ce82af46eabc4ec5cec7d580b0 (diff) |
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
-rw-r--r-- | include/clang/Lex/Token.h | 8 |
1 files changed, 5 insertions, 3 deletions
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 |