]> granicus.if.org Git - clang/commitdiff
Sort the type traits in a few places where they weren't previously
authorChandler Carruth <chandlerc@gmail.com>
Sat, 23 Apr 2011 10:47:20 +0000 (10:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 23 Apr 2011 10:47:20 +0000 (10:47 +0000)
sorted in order to prepare for adding some new ones.

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

include/clang/Basic/TokenKinds.def
include/clang/Basic/TypeTraits.h
lib/Lex/PPMacroExpansion.cpp
lib/Parse/ParseExpr.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseTentative.cpp

index 5d6f26a7da082e52868fb1fe956a9b957cca768d..6e0dd056a1af7d348398068fad352ebe210dc29a 100644 (file)
@@ -336,11 +336,11 @@ KEYWORD(__is_class                  , KEYCXX)
 KEYWORD(__is_convertible_to         , KEYCXX)
 KEYWORD(__is_empty                  , KEYCXX)
 KEYWORD(__is_enum                   , KEYCXX)
+// Tentative name - there's no implementation of std::is_literal_type yet.
+KEYWORD(__is_literal                , KEYCXX)
 KEYWORD(__is_pod                    , KEYCXX)
 KEYWORD(__is_polymorphic            , KEYCXX)
 KEYWORD(__is_union                  , KEYCXX)
-// Tentative name - there's no implementation of std::is_literal_type yet.
-KEYWORD(__is_literal                , KEYCXX)
 
 // Apple Extension.
 KEYWORD(__private_extern__          , KEYALL)
index 16a57a54851f6dbf3f5cbd27321fbeef8f9a1837..791ed34bc3f00d38f1ec58f3db77f56e644d9a0a 100644 (file)
@@ -30,10 +30,10 @@ namespace clang {
     UTT_IsClass,
     UTT_IsEmpty,
     UTT_IsEnum,
+    UTT_IsLiteral,
     UTT_IsPOD,
     UTT_IsPolymorphic,
-    UTT_IsUnion,
-    UTT_IsLiteral
+    UTT_IsUnion
   };
 
   /// BinaryTypeTrait - Names for the binary type traits.
index f0b0fad488f5b9925c4e4f780ee4954489e906f1..64b0baf383296d025ff41c1b4deeb6c862e6bb02 100644 (file)
@@ -587,10 +587,10 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
            .Case("is_convertible_to", LangOpts.CPlusPlus)
            .Case("is_empty", LangOpts.CPlusPlus)
            .Case("is_enum", LangOpts.CPlusPlus)
+           .Case("is_literal", LangOpts.CPlusPlus)
            .Case("is_pod", LangOpts.CPlusPlus)
            .Case("is_polymorphic", LangOpts.CPlusPlus)
            .Case("is_union", LangOpts.CPlusPlus)
-           .Case("is_literal", LangOpts.CPlusPlus)
            .Case("tls", PP.getTargetInfo().isTLSSupported())
            .Default(false);
 }
index cf852f82e5c7e382dad908246cddde4031737861..1a3290a43dbb46339f6496c188cba3062194dcb4 100644 (file)
@@ -983,14 +983,14 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
     return move(Result);
   }
 
-  case tok::kw___is_pod: // [GNU] unary-type-trait
+  case tok::kw___is_abstract: // [GNU] unary-type-trait
   case tok::kw___is_class:
-  case tok::kw___is_enum:
-  case tok::kw___is_union:
   case tok::kw___is_empty:
-  case tok::kw___is_polymorphic:
-  case tok::kw___is_abstract:
+  case tok::kw___is_enum:
   case tok::kw___is_literal:
+  case tok::kw___is_pod:
+  case tok::kw___is_polymorphic:
+  case tok::kw___is_union:
   case tok::kw___has_trivial_constructor:
   case tok::kw___has_trivial_copy:
   case tok::kw___has_trivial_assign:
index ccc75125ad45503e7682bd7cd18179027ff2642d..3c9ebc388bcb67a1d75b823ed0419b9413aa6e5d 100644 (file)
@@ -1926,10 +1926,10 @@ static UnaryTypeTrait UnaryTypeTraitFromTokKind(tok::TokenKind kind) {
   case tok::kw___is_class:                return UTT_IsClass;
   case tok::kw___is_empty:                return UTT_IsEmpty;
   case tok::kw___is_enum:                 return UTT_IsEnum;
+  case tok::kw___is_literal:              return UTT_IsLiteral;
   case tok::kw___is_pod:                  return UTT_IsPOD;
   case tok::kw___is_polymorphic:          return UTT_IsPolymorphic;
   case tok::kw___is_union:                return UTT_IsUnion;
-  case tok::kw___is_literal:              return UTT_IsLiteral;
   }
 }
 
index 9522691b642fafdba8f8b003114797ace53d6409..cdfe8875d4cfbabac192f70b663bb4f8454fdfaa 100644 (file)
@@ -659,10 +659,10 @@ Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
   case tok::kw___is_convertible_to:
   case tok::kw___is_empty:
   case tok::kw___is_enum:
+  case tok::kw___is_literal:
   case tok::kw___is_pod:
   case tok::kw___is_polymorphic:
   case tok::kw___is_union:
-  case tok::kw___is_literal:
   case tok::kw___uuidof:
     return TPResult::True();