[PATCH] Fix to PR5683 - issue diagnostic for pointer subtraction with type of size zero.

Richard Smith richard at metafoo.co.uk
Thu Aug 29 15:40:28 PDT 2013



================
Comment at: lib/AST/ExprConstant.cpp:6568
@@ +6567,3 @@
+        if (ElementSize.isZero())
+          return false;
+
----------------
Please issue a diagnostic here, rather than silently failing. We should produce an error on your constexpr func_2 testcase.


http://llvm-reviews.chandlerc.com/D637



More information about the cfe-commits mailing list