[cfe-commits] r126045 - /cfe/trunk/include/clang/Lex/Token.h

Peter Collingbourne peter at pcc.me.uk
Sat Feb 19 12:06:59 PST 2011


Author: pcc
Date: Sat Feb 19 14:06:59 2011
New Revision: 126045

URL: http://llvm.org/viewvc/llvm-project?rev=126045&view=rev
Log:
Reimplement Token::isAnnotation() using TokenKinds.def.  No functionality change.

Modified:
    cfe/trunk/include/clang/Lex/Token.h

Modified: cfe/trunk/include/clang/Lex/Token.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Token.h?rev=126045&r1=126044&r2=126045&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/Token.h (original)
+++ cfe/trunk/include/clang/Lex/Token.h Sat Feb 19 14:06:59 2011
@@ -103,9 +103,11 @@
   }
 
   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





More information about the cfe-commits mailing list