[cfe-commits] r143334 - in /cfe/trunk: lib/AST/ExprConstant.cpp test/SemaCXX/constant-expression-cxx11.cpp
eli.friedman at gmail.com
Mon Oct 31 15:30:42 PDT 2011
On Mon, Oct 31, 2011 at 2:16 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Sun, Oct 30, 2011 at 10:11 PM, Richard Smith
> <richard-llvm at metafoo.co.uk> wrote:
>> Author: rsmith
>> Date: Mon Oct 31 00:11:32 2011
>> New Revision: 143334
>> URL: http://llvm.org/viewvc/llvm-project?rev=143334&view=rev
>> C++11 generalized constant expressions: evaluate equality comparisons between
>> arbitrary pointers, if those pointers don't point to weak objects or literals.
> This patch causes constructs like the following to be constant-folded:
> extern char a;
> bool b = (void *) a == (void *) 0x4000UL;
> We don't really want to be doing that.
I fixed this myself in r143374; please review.
More information about the cfe-commits