[cfe-commits] r59405 - /cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Anders Carlsson andersca at mac.com
Sun Nov 16 16:27:40 PST 2008


16 nov 2008 kl. 16.24 skrev Eli Friedman:

> On Sat, Nov 15, 2008 at 10:23 PM, Anders Carlsson <andersca at mac.com>  
> wrote:
>> +      if (const Expr *LVBase = V.getLValueBase()) {
>> +        llvm::Constant *Base =
>> +          ConstExprEmitter(*this,  
>> CGF).EmitLValue(const_cast<Expr*>(LVBase));
>> +
>> +        return llvm::ConstantExpr::getGetElementPtr(Base, &Offset,  
>> 1);
>> +      }
>
> This is wrong: Offset is in bytes, and the type of the expression
> isn't guaranteed to be the same as the type of the base.
>

Yeah, I know :) I have a fix for it in my tree.

Anders


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081116/aed85ef9/attachment.bin>


More information about the cfe-commits mailing list