aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-06 05:06:21 +0000
committerChris Lattner <sabre@nondot.org>2009-01-06 05:06:21 +0000
commitb31757b68afe06ba442a05775d08fe7aa0f6f889 (patch)
tree27be8c2aee21b33df61f25ee90f352dfa020ad12
parentc792f1fa9d2c4d16dbccd34e2b57868a75f3d009 (diff)
rename tok::annot_qualtypename -> tok::annot_typename, which is both
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
-rw-r--r--include/clang/Basic/TokenKinds.def2
-rw-r--r--include/clang/Lex/Token.h2
-rw-r--r--lib/Parse/ParseDecl.cpp6
-rw-r--r--lib/Parse/ParseExpr.cpp4
-rw-r--r--lib/Parse/ParseExprCXX.cpp4
-rw-r--r--lib/Parse/ParseTemplate.cpp2
-rw-r--r--lib/Parse/ParseTentative.cpp2
-rw-r--r--lib/Parse/Parser.cpp2
8 files changed, 12 insertions, 12 deletions
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index 5cb4622f14..26781b1200 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -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
diff --git a/include/clang/Lex/Token.h b/include/clang/Lex/Token.h
index 7e397171be..a661ba82af 100644
--- a/include/clang/Lex/Token.h
+++ b/include/clang/Lex/Token.h
@@ -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);
}
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index a2fdf41862..5e753a2c9e 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -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:
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 94e686b6d7..230abf823c 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -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();
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index 5731f1f1c6..f73bbca47c 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -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());
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp
index f21854dc1e..ed5e22401e 100644
--- a/lib/Parse/ParseTemplate.cpp
+++ b/lib/Parse/ParseTemplate.cpp
@@ -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);
}
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index a76c5c66f2..dd75319b28 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -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();
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 4984ebaff8..e06d80e06d 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -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.