diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-11 08:28:03 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-11 08:28:03 +0000 |
commit | f64699e8db3946e21b5f4a0421cbc58a3e439599 (patch) | |
tree | ccb6a4e9164d9ac156a29f79d4afc345b0c24ef0 /lib/AST/ExprConstant.cpp | |
parent | 5a5dcdc9314204f103b879b5033a736af0e3462b (diff) |
Constant expression evalation: const_cast support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 2027b42d96..7eb818d223 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -830,11 +830,8 @@ static bool ExtractSubobject(EvalInfo &Info, CCValue &Obj, QualType ObjType, const SubobjectDesignator &Sub, QualType SubType) { if (Sub.Invalid || Sub.OnePastTheEnd) return false; - if (Sub.Entries.empty()) { - assert(Info.Ctx.hasSameUnqualifiedType(ObjType, SubType) && - "Unexpected subobject type"); + if (Sub.Entries.empty()) return true; - } assert(!Obj.isLValue() && "extracting subobject of lvalue"); const APValue *O = &Obj; @@ -877,8 +874,6 @@ static bool ExtractSubobject(EvalInfo &Info, CCValue &Obj, QualType ObjType, return false; } - assert(Info.Ctx.hasSameUnqualifiedType(ObjType, SubType) && - "Unexpected subobject type"); Obj = CCValue(*O, CCValue::GlobalValue()); return true; } |