We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0303fd2 commit 3dafa48Copy full SHA for 3dafa48
clang/lib/AST/ByteCode/Compiler.cpp
@@ -6039,14 +6039,12 @@ bool Compiler<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
6039
// We should already have a pointer when we get here.
6040
return this->delegate(SubExpr);
6041
case UO_Deref: // *x
6042
- if (DiscardResult) {
6043
- // assert(false);
+ if (DiscardResult)
6044
return this->discard(SubExpr);
6045
- }
6046
6047
if (!this->visit(SubExpr))
6048
return false;
6049
- if (classifyPrim(SubExpr) == PT_Ptr)
+ if (classifyPrim(SubExpr) == PT_Ptr && !E->getType()->isArrayType())
6050
return this->emitNarrowPtr(E);
6051
return true;
6052
0 commit comments