File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ template <> bool EvalEmitter::emitRet<PT_Ptr>(const SourceInfo &Info) {
152152
153153 // Implicitly convert lvalue to rvalue, if requested.
154154 if (ConvertResultToRValue) {
155- if (!Ptr.isDereferencable ())
155+ if (!Ptr.isZero () && !Ptr. isDereferencable ())
156156 return false ;
157157 // Never allow reading from a non-const pointer, unless the memory
158158 // has been created in this evaluation.
Original file line number Diff line number Diff line change 11// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s | FileCheck %s
2+ // RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s -fexperimental-new-constant-interpreter | FileCheck %s
23
34#include < typeinfo>
45
You can’t perform that action at this time.
0 commit comments