commit | e84af4e4867cadf9edbd1120edf6999e42673cdd | [log] [tgz] |
---|---|---|
author | John McCall <rjmccall@apple.com> | Sat Nov 13 01:35:44 2010 +0000 |
committer | John McCall <rjmccall@apple.com> | Sat Nov 13 01:35:44 2010 +0000 |
tree | d6819709606fa0dc0c791231ea057430c39f32cd | |
parent | 1aa5863a3e679e6dcd5dde7531569275e174b7ed [diff] [blame] |
Introduce a null-to-pointer implicit cast kind. llvm-svn: 118966
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 451aa2a..dfeb32d 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/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))