efriedma added inline comments.

================
Comment at: lib/CodeGen/CGExprScalar.cpp:72
+  if (const auto *UO = dyn_cast<UnaryOperator>(Op.E))
+    return IsPromotedInteger(UO->getSubExpr());
+
----------------
Checking isPromotableIntegerType doesn't work the way you want it to; types can 
be "promoted" without actually widening them.  For example, enum types are 
promotable, and in C++ wchar_t is promotable.


https://reviews.llvm.org/D29369



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to