]> granicus.if.org Git - clang/commitdiff
rename tok::annot_qualtypename -> tok::annot_typename, which is both
authorChris Lattner <sabre@nondot.org>
Tue, 6 Jan 2009 05:06:21 +0000 (05:06 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 6 Jan 2009 05:06:21 +0000 (05:06 +0000)
shorter and  more accurate.  The type name might not be qualified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61788 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TokenKinds.def
include/clang/Lex/Token.h
lib/Parse/ParseDecl.cpp
lib/Parse/ParseExpr.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseTemplate.cpp
lib/Parse/ParseTentative.cpp
lib/Parse/Parser.cpp

index 5cb4622f147e52a5bdf85bb57aeb4025e89c524a..26781b1200b0cd01ee8cf165f0f4c2dae09a86e8 100644 (file)
@@ -397,7 +397,7 @@ OBJC2_AT_KEYWORD(dynamic)
 //       bycopy/byref/in/inout/oneway/out?
 
 ANNOTATION(cxxscope)     // annotation for a C++ scope spec, e.g. "::foo::bar::"
-ANNOTATION(qualtypename) // annotation for a C typedef name, a C++ (possibly
+ANNOTATION(typename)     // annotation for a C typedef name, a C++ (possibly
                          // qualified) typename, e.g. "foo::MyClass", or
                          // template-id that names a type ("std::vector<int>")
 ANNOTATION(template_id)  // annotation for a C++ template-id that names a
index 7e397171be6674ec8e28d7479e11435aede5a2ba..a661ba82afd4fac3c543ee2131f5fc732509f5e8 100644 (file)
@@ -78,7 +78,7 @@ public:
   bool isNot(tok::TokenKind K) const { return Kind != (unsigned) K; }
 
   bool isAnnotationToken() const { 
-    return is(tok::annot_qualtypename) || 
+    return is(tok::annot_typename) || 
            is(tok::annot_cxxscope) ||
            is(tok::annot_template_id);
   }
index a2fdf4186277cbd1177ed2cc33d37f87db869aa3..5e753a2c9eff328a125150c219990d0693c1e342 100644 (file)
@@ -728,7 +728,7 @@ bool Parser::MaybeParseTypeSpecifier(DeclSpec &DS, int& isInvalid,
     return false;
       
   // simple-type-specifier:
-  case tok::annot_qualtypename: {
+  case tok::annot_typename: {
     isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typedef, Loc, PrevSpec,
                                    Tok.getAnnotationValue());
     DS.SetRangeEnd(Tok.getAnnotationEndLoc());
@@ -1255,7 +1255,7 @@ bool Parser::isTypeSpecifierQualifier() {
   case tok::kw_restrict:
 
     // typedef-name
-  case tok::annot_qualtypename:
+  case tok::annot_typename:
     return true;
       
     // GNU ObjC bizarre protocol extension: <proto1,proto2> with implicit 'id'.
@@ -1340,7 +1340,7 @@ bool Parser::isDeclarationSpecifier() {
   case tok::kw_explicit:
 
     // typedef-name
-  case tok::annot_qualtypename:
+  case tok::annot_typename:
 
     // GNU typeof support.
   case tok::kw_typeof:
index 94e686b6d7735f10c4cd23f7b10da87e85bd476d..230abf823ce33e03c12dc178537bfaace0c7c8fa 100644 (file)
@@ -498,7 +498,7 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression) {
   case tok::identifier: {      // primary-expression: identifier
                                // unqualified-id: identifier
                                // constant: enumeration-constant
-    // Turn a potentially qualified name into a annot_qualtypename or
+    // Turn a potentially qualified name into a annot_typename or
     // annot_cxxscope if it would be valid.  This handles things like x::y, etc.
     if (getLang().CPlusPlus) {
       // If TryAnnotateTypeOrScopeToken annotates the token, tail recurse.
@@ -622,7 +622,7 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression) {
   case tok::kw_double:
   case tok::kw_void:
   case tok::kw_typeof:
-  case tok::annot_qualtypename: {
+  case tok::annot_typename: {
     if (!getLang().CPlusPlus) {
       Diag(Tok, diag::err_expected_expression);
       return ExprError();
index 5731f1f1c6f836500d5bca0d4a7d6618e349a7b1..f73bbca47c9e1e9475c98a5d2e5000aec54b2b1b 100644 (file)
@@ -449,7 +449,7 @@ void Parser::ParseCXXSimpleTypeSpecifier(DeclSpec &DS) {
     abort();
 
   // type-name
-  case tok::annot_qualtypename: {
+  case tok::annot_typename: {
     DS.SetTypeSpecType(DeclSpec::TST_typedef, Loc, PrevSpec,
                        Tok.getAnnotationValue());
     break;
@@ -496,7 +496,7 @@ void Parser::ParseCXXSimpleTypeSpecifier(DeclSpec &DS) {
     DS.Finish(Diags, PP.getSourceManager(), getLang());
     return;
   }
-  if (Tok.is(tok::annot_qualtypename))
+  if (Tok.is(tok::annot_typename))
     DS.SetRangeEnd(Tok.getAnnotationEndLoc());
   else
     DS.SetRangeEnd(Tok.getLocation());
index f21854dc1e3a4274147be2d6558205f334bbf912..ed5e22401e7532455cde499ba9b3b1d0a7c1cc1d 100644 (file)
@@ -178,7 +178,7 @@ Parser::ParseTemplateParameter(unsigned Depth, unsigned Position) {
   if(Tok.is(tok::kw_class) ||
      (Tok.is(tok::kw_typename) && 
          // FIXME: Next token has not been annotated!
-        NextToken().isNot(tok::annot_qualtypename))) {
+        NextToken().isNot(tok::annot_typename))) {
     return ParseTypeParameter(Depth, Position);
   }
   
index a76c5c66f2014b152321c6b5f2893972f30b4dc6..dd75319b28d8e43ab4e660d89afd99da51eb03a9 100644 (file)
@@ -654,7 +654,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
   case tok::kw_float:
   case tok::kw_double:
   case tok::kw_void:
-  case tok::annot_qualtypename:
+  case tok::annot_typename:
     if (NextToken().is(tok::l_paren))
       return TPResult::Ambiguous();
 
index 4984ebaff8aac07da5b515fa43cfac096eaca43d..e06d80e06d4351fe41b400c3f08f83b5ac9e3154 100644 (file)
@@ -761,7 +761,7 @@ bool Parser::TryAnnotateTypeOrScopeToken() {
                                         CurScope, &SS)) {
       // This is a typename. Replace the current token in-place with an
       // annotation type token.
-      Tok.setKind(tok::annot_qualtypename);
+      Tok.setKind(tok::annot_typename);
       Tok.setAnnotationValue(Ty);
       Tok.setAnnotationEndLoc(Tok.getLocation());
       if (SS.isNotEmpty()) // it was a C++ qualified type name.