diff options
author | Roman Divacky <rdivacky@freebsd.org> | 2012-09-06 15:59:27 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@freebsd.org> | 2012-09-06 15:59:27 +0000 |
commit | e637711ae013940dcee207d2ea19bbd629ccd2b3 (patch) | |
tree | 026c3a08949486beaee43a0972a4fd7f63569118 /clang/lib/AST | |
parent | 4717a8d654a50af4aeb8bd926f9336a6a70d6255 (diff) | |
download | bcm5719-llvm-e637711ae013940dcee207d2ea19bbd629ccd2b3.tar.gz bcm5719-llvm-e637711ae013940dcee207d2ea19bbd629ccd2b3.zip |
Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
llvm-svn: 163325
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/RecordLayoutBuilder.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/StmtDumper.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index fba23fb468a..6581df40468 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -2522,8 +2522,8 @@ ASTContext::getObjCLayout(const ObjCInterfaceDecl *D, assert(D && D->isThisDeclarationADefinition() && "Invalid interface decl!"); // Look up this layout, if already laid out, return what we have. - ObjCContainerDecl *Key = - Impl ? (ObjCContainerDecl*) Impl : (ObjCContainerDecl*) D; + const ObjCContainerDecl *Key = + Impl ? (const ObjCContainerDecl*) Impl : (const ObjCContainerDecl*) D; if (const ASTRecordLayout *Entry = ObjCLayouts[Key]) return *Entry; diff --git a/clang/lib/AST/StmtDumper.cpp b/clang/lib/AST/StmtDumper.cpp index 962e35269c1..3695bf3430b 100644 --- a/clang/lib/AST/StmtDumper.cpp +++ b/clang/lib/AST/StmtDumper.cpp @@ -98,7 +98,7 @@ namespace { void DumpStmt(const Stmt *Node) { Indent(); OS << "(" << Node->getStmtClassName() - << " " << (void*)Node; + << " " << (const void*)Node; DumpSourceRange(Node); } void DumpValueKind(ExprValueKind K) { |