================
Comment at: lib/CodeGen/CGExprCXX.cpp:1618
@@ -1617,1 +1617,3 @@
+static bool isGLValueFromPointerDeref(const Expr *E) {
+ E = E->IgnoreParenCasts();
----------------
This doesn't handle
((T*)nullptr)[0]
Its semantics are defined in terms of a desugaring to
*((T*)nullptr + 0)
... so I suppose we should probably handle it here, but it's not entirely clear.
================
Comment at: lib/CodeGen/CGExprCXX.cpp:1619
@@ +1618,3 @@
+static bool isGLValueFromPointerDeref(const Expr *E) {
+ E = E->IgnoreParenCasts();
+
----------------
I think this will insert a null check for
T *p;
typeid( (const T&)(T)*p )
... which doesn't seem strictly necessary (though superfluous null checks here
seem pretty harmless).
http://reviews.llvm.org/D4416
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits