]> granicus.if.org Git - clang/commit
Add an APValue representation for the difference between two address-of-label express...
authorEli Friedman <eli.friedman@gmail.com>
Wed, 4 Jan 2012 23:13:47 +0000 (23:13 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 4 Jan 2012 23:13:47 +0000 (23:13 +0000)
commit65639284118d54ddf2e51a05d2ffccda567fe246
tree66b7a7ae4545db073ada0549d8af683c5c2b4231
parent08f7760eb2bc25ba3335169be83f7ba492860135
Add an APValue representation for the difference between two address-of-label expressions.  Add support to Evaluate and CGExprConstant for generating/handling them.  Remove the special-case for such differences in Expr::isConstantInitializer.

With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary.

Fixes PR11705.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147561 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/APValue.h
lib/AST/APValue.cpp
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
lib/CodeGen/CGExprConstant.cpp
lib/Sema/SemaChecking.cpp
test/CodeGenCXX/const-init.cpp