Introduce a null-to-pointer implicit cast kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 451aa2a..dfeb32d 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -604,6 +604,12 @@
return true;
}
+ case CK_NullToPointer: {
+ Result.Base = 0;
+ Result.Offset = CharUnits::Zero();
+ return true;
+ }
+
case CK_IntegralToPointer: {
APValue Value;
if (!EvaluateIntegerOrLValue(SubExpr, Value, Info))