]> granicus.if.org Git - clang/commitdiff
Change a couple of cast<> to reinterpret_cast<>.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sun, 19 Oct 2008 12:05:48 +0000 (12:05 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sun, 19 Oct 2008 12:05:48 +0000 (12:05 +0000)
The casts<> require that "Decl.h" is included before "Type.h", use reinterpret_cast<> to remove that kind of dependency.

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

include/clang/AST/Type.h

index 6ec96bc1a5a3ce720545e2c5827d5d53d8840784..a863e400ae7ebf3af163a4b1b923c2e33cea8b43 100644 (file)
@@ -1104,7 +1104,8 @@ protected:
 /// 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 @@ public:
 /// 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: