aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-19 16:39:44 +0000
committerDan Gohman <gohman@apple.com>2010-04-19 16:39:44 +0000
commitcb421fa690da545b58a720abe5f1c49b166dbde7 (patch)
tree83aec2feca44552c955bfcd70aabb3cfc36d9563 /include/clang
parentcb7464ab402d057849dda9749d62a62d86c35ab8 (diff)
Fix -Wcast-qual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/APValue.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h
index 9d4bff893f..5effa9057a 100644
--- a/include/clang/AST/APValue.h
+++ b/include/clang/AST/APValue.h
@@ -122,13 +122,17 @@ public:
return const_cast<APValue*>(this)->getFloat();
}
- APValue &getVectorElt(unsigned i) const {
+ APValue &getVectorElt(unsigned i) {
assert(isVector() && "Invalid accessor");
return ((Vec*)(char*)Data)->Elts[i];
}
+ const APValue &getVectorElt(unsigned i) const {
+ assert(isVector() && "Invalid accessor");
+ return ((const Vec*)(const char*)Data)->Elts[i];
+ }
unsigned getVectorLength() const {
assert(isVector() && "Invalid accessor");
- return ((Vec*)(void *)Data)->NumElts;
+ return ((const Vec*)(const void *)Data)->NumElts;
}
APSInt &getComplexIntReal() {