diff options
author | John McCall <rjmccall@apple.com> | 2010-02-16 03:57:14 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-16 03:57:14 +0000 |
commit | 19c8576b7328f4dc2d07682f5da552875c1912ef (patch) | |
tree | 58a9f7d18d952de3d8083e6a5baa70ec0148340f /lib/AST/Type.cpp | |
parent | fcd302b5e44e21fce82b5d78133c5c8ba6ed0727 (diff) |
Make the various type-decl Types (and their associated ASTContext routines)
accept const decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 52d734ca7e..76cc382920 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -912,8 +912,9 @@ void DependentDecltypeType::Profile(llvm::FoldingSetNodeID &ID, E->Profile(ID, Context, true); } -TagType::TagType(TypeClass TC, TagDecl *D, QualType can) - : Type(TC, can, D->isDependentType()), decl(D, 0) {} +TagType::TagType(TypeClass TC, const TagDecl *D, QualType can) + : Type(TC, can, D->isDependentType()), + decl(const_cast<TagDecl*>(D), 0) {} bool RecordType::classof(const TagType *TT) { return isa<RecordDecl>(TT->getDecl()); |