Void has no address.
This commit is contained in:
parent
6e9cd68cb2
commit
39ed28c03e
@ -216,9 +216,8 @@ static void StreamClingValue(llvm::raw_ostream& o, const Value* value) {
|
||||
o << value->simplisticCastAs<unsigned long long>();
|
||||
} else if (valType->isBooleanType())
|
||||
o << (value->simplisticCastAs<bool>() ? "true" : "false");
|
||||
else {
|
||||
else if (!valType->isVoidType())
|
||||
StreamValue(o, value->getPtr(), valType, value->getASTContext());
|
||||
}
|
||||
o << "]";
|
||||
}
|
||||
}
|
||||
|
@ -18,16 +18,16 @@ gCling->evaluate("return 1;", V);
|
||||
V // CHECK: (cling::Value &) boxes [(int) 1]
|
||||
|
||||
gCling->evaluate("(void)V", V);
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(void) @0x{{.*}}]
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(void) ]
|
||||
|
||||
// Returns must put the result in the Value.
|
||||
bool cond = true;
|
||||
gCling->evaluate("if (cond) return \"true\"; else return 0;", V);
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(const char [5]) "true"]
|
||||
gCling->evaluate("if (cond) return; else return 12;", V);
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(void) @0x{{.*}}]
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(void) ]
|
||||
gCling->evaluate("if (cond) return; int aa = 12;", V);
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(void) @0x{{.*}}]
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(void) ]
|
||||
gCling->evaluate("cond = false; if (cond) return \"true\"; else return 0;", V);
|
||||
V // CHECK-NEXT: (cling::Value &) boxes [(int) 0]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user