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) {
152
152
153
153
// Implicitly convert lvalue to rvalue, if requested.
154
154
if (ConvertResultToRValue) {
155
- if (!Ptr.isDereferencable ())
155
+ if (!Ptr.isZero () && !Ptr. isDereferencable ())
156
156
return false ;
157
157
// Never allow reading from a non-const pointer, unless the memory
158
158
// has been created in this evaluation.
Original file line number Diff line number Diff line change 1
1
// 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
2
3
3
4
#include < typeinfo>
4
5
You can’t perform that action at this time.
0 commit comments