diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-19 16:39:44 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-19 16:39:44 +0000 |
commit | 145f3f1e83932a751ae434bafa42333d4cb2c157 (patch) | |
tree | 41277159366ba04f17145ce4e62d2377e2e046ff /clang/lib/AST | |
parent | 3457061a66e23a884a34ff4274f01f96ba4867e9 (diff) | |
download | bcm5719-llvm-145f3f1e83932a751ae434bafa42333d4cb2c157.tar.gz bcm5719-llvm-145f3f1e83932a751ae434bafa42333d4cb2c157.zip |
Fix -Wcast-qual warnings.
llvm-svn: 101786
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/APValue.cpp | 3 | ||||
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 3 | ||||
-rw-r--r-- | clang/lib/AST/RecordLayoutBuilder.cpp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/AST/APValue.cpp b/clang/lib/AST/APValue.cpp index 50a6e0a50d8..731d5e04668 100644 --- a/clang/lib/AST/APValue.cpp +++ b/clang/lib/AST/APValue.cpp @@ -48,7 +48,8 @@ const APValue &APValue::operator=(const APValue &RHS) { else if (isFloat()) setFloat(RHS.getFloat()); else if (isVector()) - setVector(((Vec*)(char*)RHS.Data)->Elts, RHS.getVectorLength()); + setVector(((const Vec *)(const char *)RHS.Data)->Elts, + RHS.getVectorLength()); else if (isComplexInt()) setComplexInt(RHS.getComplexIntReal(), RHS.getComplexIntImag()); else if (isComplexFloat()) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 68620dc346b..a3c08d56b04 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4194,7 +4194,8 @@ void getIntersectionOfProtocols(ASTContext &Context, unsigned RHSNumProtocols = RHS->getNumProtocols(); if (RHSNumProtocols > 0) { - ObjCProtocolDecl **RHSProtocols = (ObjCProtocolDecl **)RHS->qual_begin(); + ObjCProtocolDecl **RHSProtocols = + const_cast<ObjCProtocolDecl **>(RHS->qual_begin()); for (unsigned i = 0; i < RHSNumProtocols; ++i) if (InheritedProtocolSet.count(RHSProtocols[i])) IntersectionOfProtocols.push_back(RHSProtocols[i]); diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index a674ad79709..3038d912fc3 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -913,7 +913,7 @@ static void DumpCXXRecordLayout(llvm::raw_ostream &OS, const ASTRecordLayout &Info = C.getASTRecordLayout(RD); PrintOffset(OS, Offset, IndentLevel); - OS << C.getTypeDeclType((CXXRecordDecl *)RD).getAsString(); + OS << C.getTypeDeclType(const_cast<CXXRecordDecl *>(RD)).getAsString(); if (Description) OS << ' ' << Description; if (RD->isEmpty()) |