aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-08-07 18:05:12 +0000
committerMike Stump <mrs@apple.com>2009-08-07 18:05:12 +0000
commite607ed068334bacb8d7b093996b4671c6ca79e25 (patch)
treebd6c53391ec6c669eeef50714b44ec9d044c37d2 /lib/AST/ASTContext.cpp
parentd0439688fea4dedc28125d246bbdec1f5a208660 (diff)
Fix some const_cast issues. This is the beginning of the rabbit hole.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 404593452c..d31f1fb16e 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2029,9 +2029,11 @@ QualType ASTContext::getDecltypeType(Expr *e) {
/// getTagDeclType - Return the unique reference to the type for the
/// specified TagDecl (struct/union/class/enum) decl.
-QualType ASTContext::getTagDeclType(TagDecl *Decl) {
+QualType ASTContext::getTagDeclType(const TagDecl *Decl) {
assert (Decl);
- return getTypeDeclType(Decl);
+ // FIXME: What is the design on getTagDeclType when it requires casting
+ // away const? mutable?
+ return getTypeDeclType(const_cast<TagDecl*>(Decl));
}
/// getSizeType - Return the unique type for "size_t" (C99 7.17), the result