[cfe-commits] r144275 - /cfe/trunk/include/clang/AST/APValue.h
NAKAMURA Takumi
geek4civic at gmail.com
Thu Nov 10 02:08:04 PST 2011
Author: chapuni
Date: Thu Nov 10 04:08:04 2011
New Revision: 144275
URL: http://llvm.org/viewvc/llvm-project?rev=144275&view=rev
Log:
include/clang/AST/APValue.h: Try to fix *900* of cast-qual warnings by g++.
Modified:
cfe/trunk/include/clang/AST/APValue.h
Modified: cfe/trunk/include/clang/AST/APValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/APValue.h?rev=144275&r1=144274&r2=144275&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/APValue.h (original)
+++ cfe/trunk/include/clang/AST/APValue.h Thu Nov 10 04:08:04 2011
@@ -262,11 +262,11 @@
unsigned getStructNumBases() const {
assert(isStruct() && "Invalid accessor");
- return ((StructData*)(char*)Data)->NumBases;
+ return ((const StructData*)(const char*)Data)->NumBases;
}
unsigned getStructNumFields() const {
assert(isStruct() && "Invalid accessor");
- return ((StructData*)(char*)Data)->NumFields;
+ return ((const StructData*)(const char*)Data)->NumFields;
}
APValue &getStructBase(unsigned i) {
assert(isStruct() && "Invalid accessor");
@@ -285,7 +285,7 @@
const FieldDecl *getUnionField() const {
assert(isUnion() && "Invalid accessor");
- return ((UnionData*)(char*)Data)->Field;
+ return ((const UnionData*)(const char*)Data)->Field;
}
APValue &getUnionValue() {
assert(isUnion() && "Invalid accessor");
More information about the cfe-commits
mailing list