Improve constant ImplicitCast codegen

Patch attached.

This patch improves VisitImplicitCastExpr in a few ways. One, it
deals with lvalues correctly, so code like:
struct s {int i[5];} val;
int* t = val.i;
would work (and not crash) if isConstantExpr let it through.
(isConstantExpr needs some improvements... I've hacked my version to
unconditionally return true for testing.)

Secondly, it deals with subsequent casts correctly, so that code like
"int zzzz = {zzzz};" doesn't crash in codegen and returns the right
result.

The change to the function type handling doesn't really make a
difference, but it's a bit more consistent with the wording in the
standard.

-Eli

fiximplicitcast.txt (2.76 KB)