]> granicus.if.org Git - clang/commitdiff
Reimplement Token::isAnnotation() using TokenKinds.def. No functionality change.
authorPeter Collingbourne <peter@pcc.me.uk>
Sat, 19 Feb 2011 20:06:59 +0000 (20:06 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Sat, 19 Feb 2011 20:06:59 +0000 (20:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126045 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/Token.h

index ef4f02cb575c2b2646bc5260360512509c63d1ea..edcfcc10d2ee316fa88e3f596f9430f1781dd6e2 100644 (file)
@@ -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