[cfe-commits] r57781 - /cfe/trunk/include/clang/AST/Type.h

Argiris Kirtzidis akyrtzi at gmail.com
Sun Oct 19 05:05:50 PDT 2008


Author: akirtzidis
Date: Sun Oct 19 07:05:48 2008
New Revision: 57781

URL: http://llvm.org/viewvc/llvm-project?rev=57781&view=rev
Log:
Change a couple of cast<> to reinterpret_cast<>.
The casts<> require that "Decl.h" is included before "Type.h", use reinterpret_cast<> to remove that kind of dependency.

Modified:
    cfe/trunk/include/clang/AST/Type.h

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=57781&r1=57780&r2=57781&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Sun Oct 19 07:05:48 2008
@@ -1104,7 +1104,8 @@
 /// to detect TagType objects of structs/unions/classes.
 class RecordType : public TagType {
 protected:
-  explicit RecordType(RecordDecl *D) : TagType(cast<TagDecl>(D), QualType()) { }
+  explicit RecordType(RecordDecl *D)
+    : TagType(reinterpret_cast<TagDecl*>(D), QualType()) { }
   friend class ASTContext;   // ASTContext creates these.
 public:
     
@@ -1150,7 +1151,8 @@
 /// EnumType - This is a helper class that allows the use of isa/cast/dyncast
 /// to detect TagType objects of enums.
 class EnumType : public TagType {
-  explicit EnumType(EnumDecl *D) : TagType(cast<TagDecl>(D), QualType()) { }
+  explicit EnumType(EnumDecl *D)
+    : TagType(reinterpret_cast<TagDecl*>(D), QualType()) { }
   friend class ASTContext;   // ASTContext creates these.
 public:
     





More information about the cfe-commits mailing list