]> granicus.if.org Git - clang/commit
Add code to make test/CodeGen/struct-init.c work correctly without the
authorEli Friedman <eli.friedman@gmail.com>
Mon, 9 Jun 2008 05:05:07 +0000 (05:05 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 9 Jun 2008 05:05:07 +0000 (05:05 +0000)
commit4caf055b9f08416d956590358796a1ed464b73f7
tree85b102aa36d253e5714d60fddd1d88fdb4bc1491
parentc92e5e4e4d632343b1f5b34cbd1d583666b1f4f8
Add code to make test/CodeGen/struct-init.c work correctly without the
pointer cast hack currently in isIntegerConstantExpr
(in lib/AST/Expr.cpp).  Also removes an odd test that even gcc doesn't accept.

The reason the pointer cast hack is relevant here is that it makes Sema
end up misinterpreting the relevant expression as a null pointer constant.

The reason for this patch is that I plan to remove the pointer cast hack
sometime soon because it causes strange issues, especially in its
current form; see my recent email to cfe-dev
"[PATCH] add constant expression evaluation to the AST and fix PR2413".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52120 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/CodeGen/struct-init.c